... | ... | @@ -30,7 +30,7 @@ To use two motors to drive the vehicle and apply the same sound value as the pow |
|
|
|
|
|
We started by equipping the robot with a sound sensor as seen in the picture below:
|
|
|
|
|
|
![fig1](http://gitlab.au.dk/uploads/group-22/lego/e8e60b9d15/fig1.jpg)
|
|
|
![IMG_0567 angle 45_smaller](http://gitlab.au.dk/uploads/group-22/lego/a311065595/IMG_0567_angle_45_smaller.jpg)
|
|
|
##### Fig. 1 - robot with microphone
|
|
|
|
|
|
Then we configured a SoundVehicle.java class which reads values from the sound sensor and maps the value to both motors on the robot. The code snippet[Fig. 2] below shows how the program reads the sound value and maps it to the motors:
|
... | ... | @@ -53,4 +53,4 @@ As the program was executed the robot did not move at first as the sound level w |
|
|
During our experiment we noted some disturbances to the readings due to the noise made by the robot itself. As the robot accelerates it produces noise which interfere with the sound reading. (See Fig. 3). This resulted in the robot continuing to the drive forward though the sound level was decreased. To overcome this problem we decided to mount the sound sensor at an increased distance to the robot. (indsæt fig2 picture[2]). By doing this the robot became less sensible to noise produced by itself.(video) Additionally we noted that the robot must be exposed to a certain amount of sound before it moves. This is due to the motors that need at least 50% power before they move. Finally we had a problem with uneven distribution of power to the two motors, but the problem was solved by replacing one of them.
|
|
|
|
|
|
[![image alt text](http://img.youtube.com/vi/JBGse9FPEqY/0.jpg)](http://www.youtube.com/watch?v=JBGse9FPEqY)
|
|
|
##### Fig. 3 - The video show the robot turning around itself, and |
|
|
##### Fig. 3 - The video show the robot turning around itself, and |
|
|
\ No newline at end of file |