... | ... | @@ -9,12 +9,12 @@ |
|
|
>* Claus Hedeager Rasmussen
|
|
|
>* Jesper Kurtzmann Svith
|
|
|
>
|
|
|
**Activity duration:** 3+6
|
|
|
|
|
|
**Overall goal**
|
|
|
|
|
|
**Overall plan**
|
|
|
|
|
|
>**Activity duration:** 3+6
|
|
|
>
|
|
|
>**Overall goal**
|
|
|
>
|
|
|
>**Overall plan**
|
|
|
>
|
|
|
> # Exercise 1
|
|
|
>
|
|
|
> **Task**
|
... | ... | @@ -26,7 +26,6 @@ |
|
|
>
|
|
|
> We made a program similar to the SonicSensorTest called SoundSensorTest, but changed it to use the sound sensor and > get the readings using the readValue() method of the SoundSensor class.
|
|
|
>
|
|
|
|
|
|
```
|
|
|
public class SoundSensorTest
|
|
|
{
|
... | ... | @@ -56,35 +55,36 @@ public class SoundSensorTest |
|
|
}
|
|
|
|
|
|
```
|
|
|
|
|
|
**Results**
|
|
|
First we clapped at different distances to the sensor in order to measure from how far the sensor Will pick up sound. We soon realized that the measurements were very inconsistent as it is impossible to make two or more identical claps in a row.
|
|
|
|
|
|
To compensate for the inconsistency we decided to use a smartphone and transmit a constant tone. The setup is showed in the picture below. The car was placed on a table in the middle of the room and loudness were measured from different distances:
|
|
|
|
|
|
![Skærmbillede 2015-03-02 kl. 09.56.58](http://gitlab.au.dk/uploads/group-22/lego/fcb16f422c/Sk%C3%A6rmbillede_2015-03-02_kl._09.56.58.png)
|
|
|
|
|
|
Fig. 1: Picture of the setup. The robot was placed on a table and the phone was pointed towards the robot. After each sensor reading the distance to the phone was increased.
|
|
|
|
|
|
| Distance (approx metres) | Sensor Reading (dB) |
|
|
|
| -------- | -------- |
|
|
|
| 0 | 81 |
|
|
|
| 0,5 | 40 |
|
|
|
| 1 | 35 |
|
|
|
| 2 | 20 |
|
|
|
| 3 | 15-20 |
|
|
|
| 4 | 9-11 |
|
|
|
|
|
|
**Skriv noget tekst her om tabellen!**
|
|
|
|
|
|
# Exercise 2
|
|
|
|
|
|
**Task**
|
|
|
To use the datalogger to record data from the sound sensor.
|
|
|
|
|
|
**Plan**
|
|
|
We use the program DataLogger.java from lesson 1 to record data from the program SoundSampler.java. Then we will process the data and make a graph using excel.
|
|
|
|
|
|
>
|
|
|
>**Results**
|
|
|
>
|
|
|
>First we clapped at different distances to the sensor in order to measure from how far the sensor Will pick up >sound. We soon realized that the measurements were very inconsistent as it is impossible to make two or more >identical claps in a row.
|
|
|
>
|
|
|
>To compensate for the inconsistency we decided to use a smartphone and transmit a constant tone. The setup is showed >in the picture below. The car was placed on a table in the middle of the room and loudness were measured from >different distances:
|
|
|
>
|
|
|
>![Skærmbillede 2015-03-02 kl. 09.56.58](http://gitlab.au.dk/uploads/group-22/lego/fcb16f422c/Sk%C3%A6rmbillede_2015->03-02_kl._09.56.58.png)
|
|
|
>
|
|
|
>Fig. 1: Picture of the setup. The robot was placed on a table and the phone was pointed towards the robot. After >each sensor reading the distance to the phone was increased.
|
|
|
>
|
|
|
>| Distance (approx metres) | Sensor Reading (dB) |
|
|
|
>| -------- | -------- |
|
|
|
>| 0 | 81 |
|
|
|
>| 0,5 | 40 |
|
|
|
>| 1 | 35 |
|
|
|
>| 2 | 20 |
|
|
|
>| 3 | 15-20 |
|
|
|
>| 4 | 9-11 |
|
|
|
>
|
|
|
>**Skriv noget tekst her om tabellen!**
|
|
|
>
|
|
|
># Exercise 2
|
|
|
>
|
|
|
>**Task**
|
|
|
>To use the datalogger to record data from the sound sensor.
|
|
|
>
|
|
|
>**Plan**
|
|
|
>We use the program DataLogger.java from lesson 1 to record data from the program SoundSampler.java. Then we will >process the data and make a graph using excel.
|
|
|
>
|
|
|
**Result**
|
|
|
The DataLogger was used to log data from the sound sensor. The experiment consisted of a period of 10 seconds in which consecutive snaps were made with the fingers. The graph below shows the results:
|
|
|
|
... | ... | |