Chapter 4.2 - Drive in response to a clap

Write the following program to have the Edison robot drive forward in response to a clap.



The Edison robot’s sound sensor is not just sensitive to claps, but can also respond to any loud sound. This includes the robot’s motors, gears and wheels, which also make sound as they turn. To prevent the sound of the robot driving from triggering the sound sensor there are two additional icons used in this program and are marked above with orange stars. The first event wait icon is set to 0.1 seconds and gives the robot’s motors time to stop. The second event wait icon is set to wait for a clap and will allow the program to continue, because it will have detected the sound of the motors.

You will need to use these two icons after stopping the motors if you are using the clap sensor.