Yelling Lights

by albertshrestha in Circuits > LEDs

172 Views, 0 Favorites, 0 Comments

Yelling Lights

20210315_152427.jpg
engineering 2 proj

This product notifies you when you are too loud/ yelling at night time. It does this by lighting up the board as well as the attached lights.

Supplies

CPX Board

wiring

lights (any kind)

Coding

Capture 2.PNG

While coding I made a forever loop. Within this forever loop I created an if statement that takes the light level value and sound level value. It makes sure that the light level is less than or equal to 10 while the sound is greater than or equal to 120, if this is true the lights will light up white and it will send a digital output to the pin A0. If these factors are not true than it will set pin A0 off and it will clear all lights/animations.

Preparing Materials

20210315_144955.jpg
20210315_144857.jpg
20210315_145228.jpg

Taking apart lights in order to expose the positive and negative terminals of the lights. (This depends on the lights you decide to use. I had solid color fairy lights, so I only had 2 terminals I could connect, some lights may be colored and have multiple connections for different primary colors.)

Implementing the Code.

engineering (2).jpg
6666.PNG

First plug in the CPX board using the USB cable to your computer. Next press download on your code, the downloaded file will pop up at the bottom and instructions will popup on your screen. Just follow those instructions (basically press and hold the reset button on the board for 5 seconds. The lights will light up green and a folder will open. Drag and drop the download into the folder. It should automatically close and then the code is uploaded onto the board.)

Assembling the Final Product

20210315_152427.jpg
20210315_152432.jpg
engineering.jpg

First connect a wire to one terminal of the lights, and connect the other end of that wire to the pin A0. Then connect another wire to the other terminal of the light (the ground terminal) and connect the other side to the ground pin (GND) on the CPX board. lastly connect the battery to the battery connection port on the board. Place the lights around your table or room, or where ever is convenient for you to see easily.