The objective of this assigment was to make use of potentiometers as a senosr to control leds. There were three parts - One was to connect a potentiometer and control one leds (either by varying the intensity or by varying the blinking rate) .; the second was to try and use multiple potentiometers to control one or more leds. and the last was to come up with a different mapping for the potentiometer state and how they control the LEDs
For the last part i used the potentiometer to control which LED was on. At its lowest point first LED glows, when the analog input is > 250, the second one glows and when it is > 500, the third one glows.
Attached the code file for the above tasks
- Login to post comments