marvin:lab3
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
marvin:lab3 [2008/09/19 12:23] – deva | marvin:lab3 [2008/10/09 21:23] – rieper | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | === Lab rapport 3=== | + | ===== Lab rapport 3===== |
**Date:** September 19th 2008\\ | **Date:** September 19th 2008\\ | ||
**Duration of activity:** 8-12\\ | **Duration of activity:** 8-12\\ | ||
**Participants: | **Participants: | ||
- | In this lesson we will use the NXT sound sensor to turn the LEGO 9797 car into a sound controlled | + | **Purpose** |
car. | car. | ||
Line 43: | Line 43: | ||
The sound was that of Bent speaking directly into the microphone, thus utilizing the entire span of the power spectrum.\\ | The sound was that of Bent speaking directly into the microphone, thus utilizing the entire span of the power spectrum.\\ | ||
The recorded samples can be seen below (MatLab plot):\\ | The recorded samples can be seen below (MatLab plot):\\ | ||
- | {{: | + | {{: |
+ | Notice that the time resolution is poor due to the low sampling time. When playing back in Wave format it is impossible to recognize any spoken words. Yet the microphone is suitable for recognizing clapping sounds and the like, where you basically just want to measure the amplitude level. | ||
====Sound Control==== | ====Sound Control==== | ||
Line 86: | Line 88: | ||
waitForLoudSound(); | waitForLoudSound(); | ||
LCD.drawString(" | LCD.drawString(" | ||
- | LCD.refresh(); | + | LCD.refresh(); |
Car.forward(0, | Car.forward(0, | ||
| | ||
Line 103: | Line 105: | ||
The code was modified to break out of the innermost loops upon '' | The code was modified to break out of the innermost loops upon '' | ||
+ | We tested the program with a threshold of 50, but the car activated the next state by the noise of the motors.\\ | ||
+ | We measured the motors running at about 40-60 in noise level, and changed the threshold to 80 accordingly. | ||
+ | |||
+ | Click the image to see a movie of the sound controlled car in action:\\ | ||
[[http:// | [[http:// | ||
marvin/lab3.txt · Last modified: 2008/10/09 21:33 by rieper