Вы находитесь на странице: 1из 3

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

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

Block 1: The first block represents more than, making the robot move when it hears a noise Block 2: The second block helps the first block as it lets the robot continue to move until you make another noise to stop it. (it represents less than) Block 3: The third block represents the motor C. It makes the robot go forward until it hears a noise to stop. Block 4: The fourth block represents the motor B. It makes the robot go forward until it hears a noise to stop. Block 5: The fifth block represents more than, making the robot move when it hears a noise to do the action the motor represents. Block 6: The sixth block represents less than, making the robot move when it hears a noise to do the action the motor represents. Block 7: The seventh block represents motor C to slow down, helping the robot to come to a halt. Block 8: The seventh block represents motor B to slow down, helping the robot to come to a halt. 5. Define the Wait for Clap behaviour you built in the program. The wait for clap behaviour defines that it, the robot, is not going to start until I either make a clapping noise or any sort of noise. From

there, the robot start to move but it wont stop until I make another noise commanding it to stop.

i.

ii.

What are the two blocks that make up the behaviour? There are two blocks because one of them represents the less than 45% of the noises the sound sensor can hear while the other block represents the greater than 45% of noises so the robot is able to hear all noises. Why isnt a single Wait For Sound block good enough? Because if you make a noise either under 45% or over 45% and you dont have one of those, it may not be able to hear you.

6. What does the threshold for the sound sensor do? What would happen if you set the threshold higher? Lower? The threshold is there so the robot is able to be programmed with the instructions we want it to do, If we set the threshold higher/lower, it would be uneven. 7. Why did you use a value from the sound sensor that was halfway between silence and clapping for your threshold value? So it is able to hear both and it is evened out. 8. Does your robot only respond to claps, or do other sounds trigger starting and stopping as well? Why do you think this is? The robot doesnt only respond to claps and it responds to other things. This is because we havent programmed the robot to listen to just claps and we have programmed it to hear other noises as well. 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. Firstly she should find out how to program it to be able to start running across when she hears a door slam. Also in order for it start right away she needs the blocks that will allow both motor b and c to move forward. ii. What possible problems might there be with this plan? A huge problem that may take place is if someone in the audience opens and closes the door at the wrong time, the robot may run out on stage thinking its his queue. Continue
Answer the following:

i.

10. How did the loop change the robots behaviour?

The loop changed the robots behaviour by letting it continue on and to repeat itself when you clap. 11. How many times will the loop run? The loop will run as many times as you want it to, when you clap to make it start and to clap to make it stop.

Вам также может понравиться