Sensing the World – Sound

Sensing the world – Sound!

In this lesson, students will learn about Sound sensor and how to deal with is using BrainPad Arcade


Target Audience

Anyone 13+ will benefit from this series. Younger audiences can still follow along when paired with an adult. An example can be a pops/grandchild STEM weekend event!

Setup

You will need any computer with a modern internet connection. Windows, Mac, and even Chromebook will work!

Having a BrainPad Arcade will help you understand the Edge connectors, take the game you made, and load it on a device you are holding. You will need some sensors from the BrainClip kit, And you need to finish the previous project from here.


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!


What next?

Try to connect the sensor with one of the games, and control your sprites with voice!

Content Licensing
Newsletter

Twitter Feed
Hot off the press!