Vous êtes sur la page 1sur 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. 40% 2. Record the sound value for loud. 40% 3. Record the threshold value you calculated. 60%

Contemplate

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

Block 1: The first sound block that starts for Motor C. Block 2: The second sound block that starts for Motor B. Block 3: The Motor C block which goes forward. Block 4: The Motor B block which goes forward. Block 5: The first sound block that stops Motor C. Block 6: The second sound block that stops Motor B. Block 7: The Motor C block which stops.

Block 8: The Motor B block which stops. 5. Define the Wait for Clap behaviour you built in the program.

i.

What are the two blocks that make up the behaviour? These two blocks are placed before the two motor blocks so that the two motors move when they hear sound.

ii.

Why isnt a single Wait For Sound block good enough? A single Wait For Sound block is not good enough because we want both wheels to move when we clap, not just one.

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 is a value that allows the robot to perform certain behaviours depending on sound. It tells us a value that sets a cut off in a range of values. If we set the threshold higher or lower this effects how loud or soft sound we have to make to make the robot move. 7. Why did you use a value from the sound sensor that was halfway between silence and clapping for your threshold value? We used the value for the sound sensor that was halfway between silence and clapping because it was important because it told 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? Our robot did not respond to other sounds and so did was not triggered up when other sounds were made in the background. 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 for her robot at the loudness of a door slamming. It should be higher than a human speaking.

ii.

What possible problems might there be with this plan? If there is another loud noise made at the wrong time, the robot may move at the wrong time.

Continue
Answer the following:

10. How did the loop change the robots behaviour? It made the robot run continuously without having to reset the program. 11. How many times will the loop run? Forever, it will only stop until you turn it off.

Vous aimerez peut-être aussi