... | ... | @@ -71,12 +71,14 @@ After being thoroughly confused by draw int for a while (TODO: Ida forstår ikke |
|
|
|
|
|
We wrote a program, ***SoundHater.java***, as the inhibitory version of ***SoundLover.java***. The program is exactly the same as the SoundLover program, except we don't invert the read value. The result is shown in Video 5. The robot accurately stops when hearing loud noises and drives forward under low sound levels.
|
|
|
|
|
|
[TODO: insert SoundHater video]
|
|
|
[![SoundHater](http://img.youtube.com/vi/be89rHd9oHs/0.jpg)](https://www.youtube.com/watch?v=be89rHd9oHs)
|
|
|
|
|
|
*Video 5: The robot running SoundHater.java*
|
|
|
|
|
|
Finally, we made the program ***TinyDancer.java***, where we initially made the robot turn left if the sensor measured a sound level above 50 (TODO Ida: som i 50 procent? Eller dB?), and turn right if the value was less than 50. The robot kept constantly turning left as the sound level caused by itself was too high. This can be seen in Video 6.
|
|
|
Finally, we made the program ***TinyDancer.java***, where we initially made the robot turn left if the sensor measured a sound level above 50 (TODO Ida: som i 50 procent? Eller dB? Nicolai: Procent... I think? Halp i need 2nd opinion Camilla), and turn right if the value was less than 50. The robot kept constantly turning left as the sound level caused by itself was too high. This can be seen in Video 6.
|
|
|
|
|
|
[![TinyDancer, 1st attempt](http://img.youtube.com/vi/gjiWjaYU4eA/0.jpg)](https://www.youtube.com/watch?v=gjiWjaYU4eA)
|
|
|
|
|
|
[TODO: Insert spin me right round baby right round]
|
|
|
*Video 6: TinyDancer robot constantly turning left*
|
|
|
|
|
|
We then tried increasing the values of the threshold for turning left or right to 80, then to 90, and lastly settled on a magic number, 93, before we were satisfied with the left-to-right ratio Lastly, we realized that the robot wasn't dancing, it was just driving forward with either the left or right motor. We then made the made the motor that wasn't currently driving forward go backwards with the same amount of power, so the robot would stand in one spot and 'dance', instead of simply driving around. The fabulous result can be seen in Video 7.
|
... | ... | |