Tuesday, November 2, 2010

Clap On, Clap Off

1. 4%
2. 100%
3. 52%
4.
First Block: The Wait block is set to wait for a noise louder than 52%.
Second Block: The Wait block set to wait for a noise softer than 52%.
Third Block: The Motor block turns on motor C and moves it forward.
Fourth Block: the Motor block turns on motor B and moves it forward.
Fifth Block: The Wait block is set to wait for a noise louder than 52%.
Sixth Block: The Wait block is set to wait for a noise softer than 52%.
Seventh Block: The Motor block tells motor C to stop.
Eighth Block: The Motor block tells motor B to stop.
5. The program waits for a loud noise and then the drop off. It then moves forward and waits for the loud noise and drop off before it stops.
i. The two blocks are one Wait block that waits for a sound above the threshold and one Wait block that waits for a sound below that threshold.
ii. One Wait block is not enough because the noise for the clap is still above the threshold as the program moves to the second wait block. The sensor thinks that the after-clap is a second clap and stops the motors.
6. The threshold is the requirement or cutoff point for how loud or soft the sound has to be for the program to continue. If the threshold was higher, it would require a louder noise for the sensor to detect it and move on in the program. If the threshold was lower, then it would require a softer noise for the sensor to detect and move on in the program.
7. The halfway value makes sure that the noise detected to start the program is larger than the quiet sound but smaller than the loud clap. The threshold is meant to include the quieter claps and exclude the louder quiet noise.
8. It responds to other noises. Any noise that meets the requirements for the threshold value will trigger the sensor.
9.
i. She will need to find the quiet value in the theater and the loud value created by the slamming door. Then, she will calculate the threshold value by averaging the two numbers. She then programs her robot to move based on that threshold value.
ii. If the audience makes noise above the threshold value, such as clapping or laughing, the sensor will be triggered and the robot will move.
10. Find the quiet value for the cafeteria and the loudest value in the cafeteria. Then average the two and create a program that will flip the switch off when the noise goes above the threshold and flip the switch on when the noise in the cafeteria goes below the threshold level.
11. After the program is run, it will go back to the beginning and wait for another loud sound.
12. The program will run forever.

No comments:

Post a Comment