... | ... | @@ -50,6 +50,8 @@ We now want to map our raw value to the range -100 to 100, in order for the robo |
|
|
|
|
|
After being thoroughly confused by draw int for a while (THANK YOU NXT!?!!11), we managed to get it working. As can be seen in the video, the robot drives forward and backward according to sound level reasonably appropriately, although it appears that when driving backwards the noise/vibrations caused by the robot is enough increase in the values picked up by the sensor that it immediately stops driving backwards, and even drives forward a bit.
|
|
|
|
|
|
We wrote a program **SoundHater.java**, to create the inhibitory connection. The program is exactly the same as **SoundLover.java**, except we don't invert the given read value. The result is as seen in [Video sound hater]. The robot accurately stops when hearing loud noises, and drives forward when hearing nothing.
|
|
|
|
|
|
### Vehicle 2
|
|
|
|
|
|
|
... | ... | |