One LED


In this project, each of the pins 8 through 13 of the Arduino is configured as an output and and used to drive one LED.

When the program sets the output to HIGH, the pin is effectively connected to the high side of the power supply of the Arduino. That's 5V for most Arduino models. 3.3V for some. When the program sets the output to LOW, the pin is set to 0V. The LED will glow only when the ouput is HIGH. Its brightness depends on the powers supply voltage, the value of R and the color of the LED.

The lower the value of R, the brighter the LED glows. Values can be as small as 220Ω or as big as 2.2kΩ. If you are not used to working with resistors you may want to learn the color code.

A similar circuit is used for all the LEDs, 0 through 6, connected to Arduino pins 8 through 13 respectively.