Vous êtes sur la page 1sur 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.

Observations:

1. Record the sound value for quiet. 7 2. Record the sound value for loud. 85 3. Record the threshold value you calculated. 60 Contemplate

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

Block 1: Block 1 calculates the sound when you clap to either move or not to move Block 2: Block 2 calculates the lowest the sound could be for the robot to still move Block 3: Block 3 makes the left motor spin Block 4: Block 4 makes the right motor spin Block 5: Block 5 picks up the sound to stop the robot Block 6: Block 6 also calculates when to stop the robot Block 7: Block 7 stops motor c Block 8: Block 8 stops motor b 5. Define the Wait for Clap behaviour you built in the program. The wait for clap makes the motors wait for a sound to activate the motors.

i. ii.

What are the two blocks that make up the behaviour? The sound sensor blocks Why isnt a single Wait For Sound block good enough? Because the clap is still above the thresh hold after you clap so the robot stops immediately.

6. What does the threshold for the sound sensor do? What would happen if you set the threshold higher? Lower? The threshold makes the clap be louder than the threshold of 60 for our robot. If it was higher we would have to clap louder, if it was lower we would have to clap softer. 7. Why did you use a value from the sound sensor that was halfway between silence and clapping for your threshold value? Because once the threshold is exceeded it blocks out the other noise so we can activate the sensor. 8. Does your robot only respond to claps, or do other sounds trigger starting and stopping as well? Why do you think this is? Because even though it may not be clapping it exceeds the threshld and activates the motor. 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. 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 determine the threshold value of the door slamming and then set that threshold to the robot to activate the motor to go across the stage. ii. What possible problems might there be with this plan? If the audience or other actors exceed the threshold it could mess up the cue. Continue