My project is a sound reactive led strip. It receives audio input from a device such as a phone or a computer and lights up a certain number of leds in respect to the volume of the audio. I can also change the mode of the leds over WiFi so that the leds light up differently.
Area of Interest
Leland High School
For my starter project, I made a RGB nightlight. It has a photoresistor than changes its resistance according to the light intensity of the surrounding. My code then sets a threshold value and if the return value from the photoresistor falls below, the RGB led lights up. It also has a potentiometer. I specified different ranges for the potentiometer with different colours. This would allow me to change the colour by twisting the nob on top of the potentiometer.
I chose this project because it uses RGB leds which I would need to use for my main project. From this project, I was able to learn the functions of both the photoresistor and the potentiometer. The main problem with making this work was the final soldering onto the PCB board. The boards were really small and it was extremely difficult to solder the components onto the boards.
For my first milestone, I was able to get my microphone working together with the led strips. I pulled code from the adafruit website and was able to get inputs from the microphone in the serial monitor. I also downloaded the library for the NeoPixels and was able to run a blink test for the leds. Next, I set a simple If function and got the leds to light up if the microphone detects a sound louder than a value that was set in my code.
I was not able to get the leds to light up initially because I was using a different library. However, after tips from another student working on a similar project, I was able to find the correct library and run the blink test. From this I learned the importance of libraries and how it can speed up the coding process.
For my second milestone, I was able to get a led to light up over the internet. I found a library from the Arduino website called WiFi NINA. They also had example code that allowed me to light up the led wirelessly. After uploading my code to the Arduino board, I can open up a tab on a browser that has commands to turn the led on or off. When I click on the command to turn the led on, the computer sends packets containing this command over to the router. The Arduino board then receives this from the router and turns on the led.
I was not able to get the leds to light up initially because I tried to get the Arduino talking with another WiFi board which is a micro processor with WiFi capabilities. However, after many tries, I realised that the WiFi board was not strong enough to power the leds that I was going to use. I scrapped that idea and found my current library that allowed me to light up the led. From this, I learned that not all electrical components are compatible with each other and by checking the specs, I can see if they will work with each other before even buying them.
For my final milestone, I finished building my box. I first cut out 5, 3.5 by 3.5 inches blocks of wood. For the first 2 pieces, I cut 1/2 inch by 1/2 inch holes in the middle in order to fit my U-channel in and for the last 3, I cut 3 inches by 2.5 inches holes in the middle to fit my electronics.. Then I glued them together using wood glue and drilled at the side in order to plug in the adapter. I then wrapped my U-channel in wax paper and secured it in the hole I made with super glue. Lastly, I spray painted the box so that it would look nicer.
The main problem I had with machining my box is cutting the holes in the middle of the box. The jigsaw cannot start cutting from the middle of the piece of wood, I had to first drill holes in to make a hole for the jigsaw bit to fit before I can start cutting it.
For my modifications, I made a wireless switch using nRFs. I first had to find a library online and their sample code online allowed me to transmit a simple message of “Hello World” from one Arduino to another. The nRF module transmit radio waves and the Arduinos will be able to communicate with one another as long as they are both on the same channel.
My main problem with the nRF was the chancel. I was using the same channel as somebody else who was also using the nRFs. Because of this, I was not able to successfully send my messages because our signals interfere with each other. After learning about this, I changed the channel I was using and was able to send the messages.