Personal Project 4: Clap Lights

     Light Clap

I needed to address an issue that could be solved with an Arduino. I went ahead with the idea of when you're in bed with the lights still on. So, with the use of sound, we can change the state of the Leds. I would have it programmed to work with a rgb strip but 

Initial Setups

This is the initial build I used for my testing to make sure that I can get my lights to light up and test to see if i can get values from the piezo. 

This is the code I used to make sure the circuit worked, and all the lights lit up. I just used hard coded values for testing and would later change it to have only certain ones light up.




















This is my final setup and parts list. I successfully got the value to light the Leds up and the value from the piezo were in tolerance.





Final Coding

Arduino:













I got the code together to make it have different states of lit up lights to replicate an RGB strip. The code was pretty simple. The code to make it so that the clap will change the states is the same as the Knock Lock exercise in the Arduino starter kit.


Final Thoughts

This was a fun project and can be useful and helpful for when you get into bed and forget the lights. Also allows you to not have to turn the lights off when going to bed and subsequently trip over everything along the way to the bed.





Comments

Popular posts from this blog

Personal Project 3: Etch A Sketch

Personal Project 2: Tic Tac Toe