Sie sind auf Seite 1von 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. 6 2. Record the sound value for loud.84 3. Record the threshold value you calculated. 45 Contemplate

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

Block 1: It allows the robot to recognise when there is a sound made Block 2: It allows the robot to recognise when the clap is finished Block 3: It allows port C wheel to move forward after the clap Block 4: It allows port B wheel to move forward after the clap Block 5: It allows the robot to recognise when there is a sound made Block 6: It allows the robot to recognise when the clap is finished Block 7: It allows port C wheel to stop Block 8: It allows port B wheel to stop 5. Define the Wait for Clap behaviour you built in the program.

i.

What are the two blocks that make up the behaviour? The motor blocks and these two blocks just tell the robot to move when a sound is made Why isnt a single Wait For Sound block good enough? You need the two blocks to tell the robot when the sound is made and when the sound has stopped

ii.

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 at around what level of noise to move. If it is set higher, more noise is required to make it move. If it is set lower, less noise is needed to make it move. It is set according to the environment you are in, depending on the level of noise. 7. Why did you use a value from the sound sensor that was halfway between silence and clapping for your threshold value? It tells us at what level approximately, the robot can detect and 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? It is programed to move at any noise made, but claps are easier as they are more direct. 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. The robot should be programed to move when the door slams, which is much louder than the average human speaking. Hence, you need to set the threshold very high. What possible problems might there be with this plan? If a loud noise is made by accident when not supposed to, the robot may detect this noise and move at the wrong time.

ii.

Continue
Answer the following:

10. How did the loop change the robots behaviour? It allowed it to continuously run without having to reset the program 11. How many times will the loop run? It wont stop. It will stop when you turn it off

Das könnte Ihnen auch gefallen