Sound Sensing
In this lesson, students will learn about Sound sensor and how to deal with is using BrainPad Arcade
Setup
You will need any computer with a modern internet connection. Windows, Mac, and even Chromebook will work!
You will need some sensors from the BrainClip kit, And you need to finish the Edge Pads project.
Save the Pearls
We are under the ocean, where there are many Pearls and sharks. A shark is trying to take a pearl, and we should help the pearl to close when the shark is near it.
First, we will add the background and the sprites.
Then, we will make the shark move in random positions using this code.
Connect “GND” from the sensor to “GND” at the Arcade, and “VCC” from the sensor to the “3V” at the Arcade. Finally, choose a pin to control it, we connect “SIG” from the sensor to PIN0 at the Arcade
Now, we will program the sensor, using “analog read” If the sensor reads a low value (greater than 200 depending on your sounds) when shout “CLOSE” to tell the pearl to close!
Open it!
Close it!