Tuesday, May 24, 2011

Arduino UNO: Potentiometer used as a 10-way LED switch


Using similar principles as before, I have used a potentiometer (variable resistor) as an Analog input. I have mapped the value received from the potentiometer (0 to 1023) and converted the value to a number between 4 and 13, which represent the OUTPUT pins that light up the LEDs.

If you would like to see the sketch/code, let me know in the comments.

No comments:

Post a Comment