... | ... | @@ -39,6 +39,7 @@ Try to play music and make mappings from the sound sensor to the two motors that |
|
|
[![image alt text](http://img.youtube.com/vi/6xmiIcyXkkI/0.jpg)](http://www.youtube.com/watch?v=6xmiIcyXkkI)
|
|
|
##### Video 1 - Car speed increases by the level of sound
|
|
|
|
|
|
|
|
|
As seen in the video the car moves forward when it detects a sound higher than 50 db. We have done this since the sound level that is detected by the microphone, when the room is totally quiet, differs between 10 and 20 db. We do not know exactly why this is, but could relate to a bad microphone or a too sensitive one.
|
|
|
We also notice that when the robot detects a decibel of eg. 60, the power that we have mapped to the motors are not enough for making robot drive. We did not manage to get a dynamic flow of the speed in relation to the distance of the sound source, it seemed like it only differed between three types om movement; backward, no movement, and full-power.
|
|
|
|
... | ... | @@ -52,7 +53,9 @@ Another interesting aspect we found in regards to the detected db level by the m |
|
|
[![image alt text](http://img.youtube.com/vi/RjXNnXft9nQ/0.jpg)](http://www.youtube.com/watch?v=RjXNnXft9nQ)
|
|
|
##### Video 2 - Car speed decrease by the level of sound
|
|
|
|
|
|
|
|
|
As the video shows, the speed of the car decreases accordingly to the detected level of sound by the microphone. However, we see that it isn’t a smooth or dynamic movement, and it is further seen that when the sound source is up close to the microphone the robot varies between stopping or driving a little. We think that the cause of this is due to a sensitive microphone as mentioned in the previous section, when experimented with increasing the speed of the car. It could also be due to the fact that the motor power gets so low that there is not enough power for the car to drive.
|
|
|
|
|
|
### Implemented code:
|
|
|
Our implemented code[3] takes inspiration from a previous program used in another experiment; soundCtrCar.java[2].
|
|
|
|
... | ... | @@ -90,7 +93,7 @@ while (! Button.ESCAPE.isDown()) // inhibitory |
|
|
}
|
|
|
|
|
|
```
|
|
|
#####Code snippet 1[3]
|
|
|
##### Code snippet 1[3]
|
|
|
The above code snippet shows the two different ways we have mapped the sound level to power the motors. In the first one we increase the power of the motors accordingly to the detected level of sound and the other on does the opposite.
|
|
|
|
|
|
### Conclusion
|
... | ... | |