Arduino and Potentiometer: Turning on lights one by one

 For this assignment, I used a potentiometer to turn on a set of LEDs one by one. The LEDs can be replaced with any other item and be activated one by one


And here is the video of it working!


There is a problem with this circuit that I am trying to fix. The lights are only supposed to receive power when the button is pressed, but they always receive power no matter what. 

This is the code that I used. It is a slightly modified version of the code we made in class with 3 LEDs, because the original wasn't working properly. I am not sure what exactly the problem is, but I will figure it out.


If this was to work properly, I would have use it to create an artwork.
My current idea is
  • A highly interactive scavenger hunt. The potentiometer circuit will be placed in a cardboard box shaped like a vintage radio. Turning the dial will turn the potentiometer, which will switch between different "stations" which would just be preloaded songs on an Adafruit SFX board. One of the stations will contain a morse code. A morse code decipher sheet will be next to the radio. When decoded, it will be a prompt to lead the viewer to search for something in another area. The rest of the setup would be just for aesthetics, like a fireplace on the projector, an arm chair, a rug, some newspapers, coffee. Things to give that Sherlock Holmes vibe. I am not sure what story to tell through the scavenger hunt, I am currently thinking of one.
Rough sketch of what it might look like:



Comments

Popular Posts