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% 2. Record the sound value for loud. 98% 3. Record the threshold value you calculated. 50% Contemplate

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

Block 1: Waits for the noise level to exceed 75 Block 2: Waits for the noise level to go below 75 Block 3: Activates Motor C Block 4: Activates Motor B Block 5: Waits for the noise level to exceed 75 again Block 6: Waits for the noise level to go below 75 again Block 7: Stops Motor C Block 8: Stops Motor B 5. Define the Wait for Clap behaviour you built in the program.

i.

What are the two blocks that make up the behaviour? Block 1 which waits for the noise level to exceed 75, and Block 2 which waits for the noise level to go below 75

ii.

Why isnt a single Wait For Sound block good enough? Because by the time it moves onto the next command, there is still noise

6. What does the threshold for the sound sensor do? What would happen if you set the threshold higher? Lower? The threshold for the sound sensor tells the robot between loud and quiet. If you made the threshold higher, it would be less sensitive to loud noises. Then if you made it lower it would be less sensitive to soft noises. 7. Why did you use a value from the sound sensor that was halfway between silence and clapping for your threshold value? Because it is the halfway point between loud and quiet for the robot 8. Does your robot only respond to claps, or do other sounds trigger starting and stopping as well? Why do you think this is? No, it responds to other sounds as well. This is because they are above the threshold volume. 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 should set the threshold value quite high, and put a wait for on the sound sensor on 98. Then, program the robot to move forward What possible problems might there be with this plan? A possible problem is that there could be lots of loud background noise in the room that is above the threshold value.

ii.

Continue
Answer the following:

10. How did the loop change the robots behaviour? It made the action endless 11. How many times will the loop run? An endless amount of times

You might also like