You are on page 1of 2

Worksheet: Clap On, Clap Off

Introduction to Mobile Robotics > Clap On, Clap Off


Follow the steps in the online directions, and answer the questions at the appropriate times.

Construct: Write Your Program

Observations:

1. Record the sound value for quiet. 2% was the first recording in a silent room. 2. Record the sound value for loud. 100% was the reading when Rachel clapped. 3. Record the threshold value you calculated. The true average is 51% but we are going to use 60%. Contemplate

4. Write a brief description of what each block in your program does.

Block 1: Reading the sound level to decide and manipulate when the program runs. The sound reading will react to sounds >60 Block 2: Reading the sound level to decide and manipulate when the program runs. The sound reading will react to sounds >60 Block 3: motor block makes the wheels turn. Its direction is forward Block 4: motor block makes the wheels turn. Its direction is forward Block 5: Reading the sound level to decide and manipulate when the program runs. The sound reading will react to sounds >60 Block 6: Reading the sound level to decide and manipulate when the program runs. The sound reading will react to sounds >60 Block 7: Motor block that controls the breaking of the robot Block 8: Motor block that controls the breaking of the robot 5. Define the Wait for Clap behaviour you built in the program.

i.

What are the two blocks that make up the behaviour? They are sound blocks because we are programing with sound to move the robot.

ii.

Why isnt a single Wait For Sound block good enough? If it was single it wouldnt stop both motors in the robot and it would end up with one motor shut off and the robot would spin in a circle.

6. What does the threshold for the sound sensor do? What would happen if you set the threshold higher? Lower? 7. Why did you use a value from the sound sensor that was halfway between silence and clapping for your threshold value? Because you dont want it to accidently be reading backgrou nd noise and confuse it as a reading for it to move. 8. Does your robot only respond to claps, or do other sounds trigger starting and stopping as well? Why do you think this is? Yes our robot responds to the sound of my voice. I think it does this because it is the right frequency and that will for fill the requirements that a clap does. 9. Marisa is using the robot as an actor in a class play. She wants the robot to start running across the stage on cue. The cue will be the sound of a door slamming as another (human) actor goes offstage. i. How should she go about programming her robot to recognize the correct sound and begin its performance at the right time? Be specific. she would have to find a particular frequency that cant be confused with any background noises, as well as stoping it when it crosses the stage. What possible problems might there be with this plan? Finding a unique pitch that cant be confused, will be the main problem,

ii.

Continue
Answer the following:

10. How did the loop change the robots behaviour? It changes the robots behaviour so that it can be programed to continue its programed movements until it is registering a command to change. 11. How many times will the loop run? It will run till it is programed to stop.