Sunday, 20 October 2013

Dim & Dimmer


When I started to make this project I only had a few components at my disposal, two Potentiometer's, a single LED and some miscellaneous resistors. At first I used the example sketch AnalogReadSerial to print the value of a Potentiometer to a serial monitoring program on my PC. After seeing the Fade sketch that allows a LED to fade in and out. I got ideas from both pieces of code and then managed to write a compact and simple sketch allowing the brightness of an LED to be controlled by a Potentiometer.

// If any of the images are too small click once to enlarge.
// Sorry about the video quality, it was compressed to lower resolution after being uploaded.

Code:

Circuit Diagram:
Demonstration:

No comments:

Post a Comment

Note: only a member of this blog may post a comment.