Site Navigation

Your Account

Choose Language

Introduction

In Project 2 you will have opened your kit and found some LEDs, resistors, breadboard and jumper wires.

Let's plug them in and get started!

Tools

No tools required.

Parts

  • The first thing we're going to do is build up our circuit. Once this is done we'll program our Arduino using the Arduino IDE.

Add Comment

We've provided you with a mini breadboard. These breadboards have conductive material that connects the holes (known as points) inside the breadboard. The breadboard points are connected to each other vertically, with a trough in the middle that enables more prototyping area.
  • We've provided you with a mini breadboard. These breadboards have conductive material that connects the holes (known as points) inside the breadboard.

  • The breadboard points are connected to each other vertically, with a trough in the middle that enables more prototyping area.

  • The conductive material (and electrically joined points) are shown in this diagram in gold.

Add Comment

Insert your LED into your breadboard so that the cathode (short leg) is on the left-hand side and the anode (long leg) is on the right-hand side.
  • Insert your LED into your breadboard so that the cathode (short leg) is on the left-hand side and the anode (long leg) is on the right-hand side.

Add Comment

Insert your resistor so that one of it's legs vertically in line with the LED's anode (long leg).
  • Insert your resistor so that one of it's legs vertically in line with the LED's anode (long leg).

Add Comment

Run a jumper wire from an Arduino Ground Pin (GND) to the LED's cathode.
  • Run a jumper wire from an Arduino Ground Pin (GND) to the LED's cathode.

Add Comment

Run another jumper wire from pin 9 so that it's vertically in line with the resistor's other leg.
  • Run another jumper wire from pin 9 so that it's vertically in line with the resistor's other leg.

Add Comment

  • The resistor is the longer wire with bead like middle.

Add Comment

  • This code will turn an LED on and off just like we did with the onboard LED on Day 1.

  • The only difference in this code is that we've changed the pin on which the LED will blink from Digital Pin 13 to Digital Pin 9.

  • Copy and paste the code into your Arduino Software.

  • Upload the code by clicking on the arrow button (just like we did yesterday).

Add Comment

  • Remember HIGH is on and LOW is off

  • The delay will be the amount of time the light stays on or off

Add Comment

We didn't select Digital Pin 9 by accident. Pin 9 along with Digital Pins 11, 10, 6, 5 and 3 are special pins that can do something called pulse width modulation. Pulse Width Modulation (PWM) is a type of digital signal that can control the dimming of LEDs.
  • We didn't select Digital Pin 9 by accident. Pin 9 along with Digital Pins 11, 10, 6, 5 and 3 are special pins that can do something called pulse width modulation.

  • Pulse Width Modulation (PWM) is a type of digital signal that can control the dimming of LEDs.

  • With PWM we can fake an analogue output and make our LED change brightness.

Add Comment

  • This program (from the Arduino examples) will make your LED fade in and out.

Add Comment

  • This code will demonstrate how to make your LED flicker like a candle. This is a really simple special effect you can add to models or other installations.

  • Copy and paste the code into your Arduino Software.

  • Upload the code by clicking on the arrow button (just like we did yesterday).

Add Comment

Conclusion

After today you will have some LEDs flickering and fading

20 other people completed this guide.

Madeleine Schappi

Member since: 09/27/2017

4,857 Reputation

57 Guides authored

Team

Advent Edit Member of Advent Edit

Community

3 Members

57 Guides authored

5 Comments

Awesome stuff Maddie! I’m excited to do these every day up until Christmas :)

Jackson Hales - Reply

Hi Maddie, this was great. One question, how do you stop the program?

Leone S - Reply

The kids are loving the advent… fantastic idea, thank you! I know it's early Sunday morning but they're already impatient for the next instalment (kids!)… is there any eta?

Nano Wasp - Reply

Its up! Sorry….forgot to schedule it :)

Madeleine Schappi -

Thank you, Maddie! They really enjoyed day 3 =)

Nano Wasp -

Add Comment

View Statistics:

Past 24 Hours: 0

Past 7 Days: 1

Past 30 Days: 2

All Time: 558