Art Meets Engineering: Using an Arduino compatible microphone to create light based on sound

     This weeks project was based on using good engineering principals to create art. I tend not to be a very artistic person in general, but when I thought about art, I tend to think of movies, and moving colors, so I can up with the idea for colors to move based on the "strength" of your voice. While the piezo can detect stuff such as taps, I needed a microphone to detect actual sound input, so I had to order one off of Amazon. In the parts diagram below, swap out the piezo for the microphone, but everything else is exactly what I used.

I connected all the regular LED's to digital pins 2-8 and 12, so that way I could just send a simple High/Low when I needed them on or off. I connected the RGB LED's pins to digital 9-11, so that way I could use the PWM technique to get analog results from a digital pin. I connected the final pin to ground. The microphone is connected to the 5V, ground, 0 digital pin, and the A0 analog pin to out put the digital and analog results.


The code was very simple for this project. It just included setting up the pins for all the LED's, and then setting some guidelines for what the maximum volume intake should be. I then created a series of If/Else statements, turning off/on the LED's as the inputted sound gets louder, showing that voice "strength" through the LED Line. The RGB LED has to constant values, (), and one non constant one () that is determined by the current sound value times 3. This changes the RGB LED's color too as sound increases.


While Im not usually the most creative person, it was fun letting my artistic side roam with this project. It was also one that got my friends super involved in the process with me, as I gave them all chances to scream into the microphone to see who could get the highest up (none of them did). There weren't any large setbacks (except for the microphone taking a week and a half to deliver).




Comments

Popular posts from this blog

IGME 480 Final Project Post: Road Shadows

P1 Completed Project Post

P1 Planning Blog Post