Tutorial 1 and Step 7 on Wrapping Up for Intel® Galileo Boards
In this lesson, we learn what machines can hear. From simple outputs using the serial monitor, to LEDs that respond to audio input, we just scratched the surface on what's possible.
We learn how breadboards can help us with extending our micro-controller by providing us with an array of options for plugging in sensors.
Using the serial monitor, we are able to output the incoming values of what the microphone picked up. To see that in the physical world, we connected an LED with an accompanying resistor that helped limit the flow of current. By using Ohm's Law, we were able to calculate the correct amount of resistance needed to not blow out our LED.
Challenges
-
How would you adjust the code to turn the LED on at a lower (volume) sound sample?
-
Connect a few more LEDs to your project and light them up based on the incoming data received from the microphone. Try blinking each LED based on a different range of incoming readings.
-
Open up the fade example (File > Examples > 01.Basics > Fade). How can you use this example code to expand on your code?
Note | This code is using pin 9 for the LED, so you can use your current circuit to test it out. |
-
When the sample rate reaches a certain value, set the brightness of the LED to dim. Otherwise set it fully bright.
-
The incoming sound data is a bit jagged; there's not a smooth transition between values. How can you use a smoothing technique (calculating average incoming readings) to get steady shifting values?
Arduino Smoothing Tutorial