Starting with this project, I knew I wanted to do something with the lights, something that made it get dimmer or brighter. After the initial phase and finding a paper lantern that I had brought earlier in the summer, I figured what if I had it playing a melody as well? With those two elements combined, a sort of light that was dimmable as well as music coming from the element, it turned into a nightlight/music box. The idea came from when I was younger and I loved playing with lights in the dark, they gave me a sense of comfort from the terrors that lurked in the shadows.
I combined the code that we learned from the lab about using the potentiometer to control the lights on the board. Then I adjusted the code that was created using a switch to turn the melody on or off. After adding those elements together, carefully placing the board within the paper lantern, and feeding the cables through the opening of the lantern, I created the Nightlight Music Box. The lantern wouldn't allow me to feed the cables through the base because of the way it was constructed, so I had to carefully lead it through the top, falling towards the back of the housing.
When you adjust the potentiometer, it adjusts the brightness of the lights. When you flick the switch, it plays the melody until completion, no matter if the switch was turned off before the melody was finished.
Comments
Please log in or sign up to comment.