 |
 |
|
|
|
|
|
| How can I command my NXT car to move only when the sound in the room is more than a certain decibel level? |
| (1 ) |
100%
0%
|
The most efficient way to do this is to use a sound switch. The only difficult part is to figure out what sound level (on a scale of 1-100) your threshold decibel level is. This can be done easily by running the program while your NXT is plugged into the computer and checking the current sound reading in the room, seen in the "feedback box" shown below. In this example, the motors run while the sound is above a certain reading and stop when the sound is below that value.
This is what the program looks like:

Here is shown the controls for the switch. The gray box under the switch icon is the "feedback box", and will display the current sound reading while the program is running if the NXT is attached to the computer.

Don't forget to set your threshold value in the "compare" box. Also, the switch command always defaults to a touch switch, so remember to set the sensor type to "sound sensor" in the sensor box.
|