Back to Parent

Process

This project was divided into 4 parts: Powering On/Off, Listening and Publishing

Powering on and off - Using a button and an LED I created a switch and indicator light. The switch, since it is a tactile push button, required programming to have an on state and off state. Originally I was going to let the device continually listen and send data until it hit a certain threshold. Understanding that it would not be able to handle that while on battery power I switched my tactics.

I added a button to be press to trigger the  on-state is stored. The LED will also turn on to indicate that the device is sampling. 

Listening -  The microphone is picking up the highest and lowest signals over a 50 millisecond period and subtracting them to figure out the range sound level. It would then compare it to a given sound level to see if it was too loud. 

To find that given sound level I would have run the microphone thorough the serial port to get ambient hallways sound levels. I had trouble doing that because the serial port didn't work with windows. Instead I got an average using the particle.variable output and added just a bit more sound outside of the error range. 

Publishing - Simply put the final part of the device was to use the checked sample data to know when I was being too loud. If the sampled sounds ever exceeded the average I calculated and entered it would publish a too loud event to the particle. Using IFTTT I then had the messages sent to my cell phone.


Content Rating

Is this a good/useful/informative piece of content to include in the project? Have your say!

0