@@ -27,6 +27,8 @@ It kind of felt as if it was a creature that tried to avoid decection by being a
The robot had an interesting behaviour, when a loud sound occurred it would drive with high speed forward until it hit a wall, this resulted in lowering the noise from the motor and the robot now started backing away from the wall until another loud sound occur. Though every once in a while it would just continue driving into the wall.[4]
The Code for this is below, we did not make the most clean implementation since soundlevel goes above a little above 1000, but it we do not think changing it would have made a large difference.
```java
while(!Button.ESCAPE.isDown()){
soundLevel=sp.readRawValue();
...
...
@@ -38,8 +40,6 @@ while (!Button.ESCAPE.isDown()){
}
```
// fil i googledrev: T_part1.java, also add code, comment