... | ... | @@ -201,7 +201,8 @@ |
|
|
> The program ClapCar.java is familiar with the clap sound profile and once a clap is detected the robot will play a
|
|
|
> sound (see video).
|
|
|
>
|
|
|
> [![image alt text](http://img.youtube.com/vi/UMSrPEmQrwE/0.jpg)](http://www.youtube.com/watch?v=UMSrPEmQrwE)
|
|
|
> [![image alt text](http://img.youtube.com/vi/UMSrPEmQrwE/0.jpg)](http://www.youtube.com/watch?v=UMSrPEmQrwE)
|
|
|
> ##### Fig. 7: Video of the clap detecting robot in action.
|
|
|
>
|
|
|
>```
|
|
|
> while (!Button.ESCAPE.isDown()) {
|
... | ... | @@ -229,10 +230,10 @@ |
|
|
> Thread.sleep(5);
|
|
|
> }
|
|
|
>```
|
|
|
> Fig. ??: Inner loop of the ClapCar program.
|
|
|
> ##### Fig. 8: Inner loop of the ClapCar program.
|
|
|
>
|
|
|
> ![G3](http://gitlab.au.dk/uploads/group-22/lego/8b5ba5b544/G3.png)
|
|
|
> Fig. ??: Graph showing the profile of a single clap of sound level over time.
|
|
|
> ##### Fig. 9: Graph showing the profile of a single clap of sound level over time.
|
|
|
>
|
|
|
> We noticed that it is possible to trick the robot into thinking it hears a clap by shouting a short word to the sound sensor. This is due to the fact that the robot only distinguishes between volume and duration of a sound meaning that different sounds can actually result in the same sound profile. The graph below [fig. ??] shows a series of claps showing three distinct peaks. Each peak is a registered clap. The smaller peaks will not result in a beep as the sound profile does not match that of a clap.
|
|
|
>
|
... | ... | @@ -247,7 +248,7 @@ |
|
|
> drive towards the location with the loudest sound level.
|
|
|
>
|
|
|
> ![P2](http://gitlab.au.dk/uploads/group-22/lego/ed19ec2872/P2.png)
|
|
|
> Fig. ??: Picture showing how we mounted the two sound sensors on the NXT robot.
|
|
|
> ##### Fig. 10: Picture showing how we mounted the two sound sensors on the NXT robot.
|
|
|
>
|
|
|
> The two sound sensors were mounted on the opposite sides of the robot facing away from each other at a 90 degree
|
|
|
> angle (perpendicular to each other), as can be seen in fig. ??.
|
... | ... | |