Picture of arduino control leds with a pot meter
this is just a fun easy project.
Remove these adsRemove these ads by Signing Up

Step 1: Parts

3.usb cable
4. 4 leds
5. 4 330 ohm resistors
6.10k pot meter
7. and fun

Step 2: First

Picture of first
insert al the leds in the bread bord.

Step 3: Then

Picture of then
then you must insert the resistors.
led 1 to pin2
led 2 to pin 3
led 3 to pin 4
led 4 to pin 5

Step 4: Tree

Picture of tree
then in sert the pot meter
pin 1 to ground
pin 2 to analogpin 0
pin 3 to +5 v
oke youre al done now yust
the code

Step 5: The code!!!!

the code i have writen
is below
potled.pde583 bytes
Noodle936 years ago
There's also another way to achieve this, but this is also correct and a fun beginners project. The other way to make this cuts down on the amount of resistors. Instead, connect all of your LED's to a single resistor which connects to +5v. Then connect the other side of the LED's to the I/O pins. Then say you want LED 1 on, you would then write that pin LOW, so that current flows through. To turn it off, write it HIGH. Have fun and keep experimenting.