... | ... | @@ -24,8 +24,7 @@ Start by rebuild by [1] |
|
|
Caaaaan we build it? YES WE CAN!!! (perhaps insert picture of fancy AF Frej?)
|
|
|
|
|
|
### Vehicle 1
|
|
|
We started by writing a program, **SoundLover.java** to have the robot drive forward proportional to sound received by a single sound sensor. Since we have no specific range of sound values we are interested in, we map the complete range of possible raw values from the sound sensor (0 to 1023) to the range of possible motor power from full stop to full speed forward (0 to 100). We do this simply by converting the measured raw value to a percentage of possible maximum value, and using this percentage as the parameter for motor power.
|
|
|
|
|
|
We started by writing a program, **SoundLover.java** to have the robot drive forward proportional to sound received by a single sound sensor. The sound sensor appears to measure the dB value somewhere between 0 and 100. We base this on the fact that the absolute highest value seen in our most extreme experiments in our Lesson 3 exercises (where we also used the sound sensor), was a value of 92. As a result, we deem it reasonable to simply map the read sound value directly to motor power, so we pass the measured sound by *readValue()* along as a parameter to the motor power.
|
|
|
|
|
|
|
|
|
|
... | ... | |