... | ... | @@ -83,14 +83,6 @@ We are planning to do this by looking at the leJos tutorial on how to use a Butt |
|
|
|
|
|
#### Results
|
|
|
```
|
|
|
import lejos.nxt.*;
|
|
|
/**
|
|
|
* The locomotions of a LEGO 9797 car is controlled by
|
|
|
* sound detected through a microphone on port 1.
|
|
|
*
|
|
|
* @author Ole Caprani
|
|
|
* @version 23.08.07
|
|
|
*/
|
|
|
public class SoundCtrCar
|
|
|
{
|
|
|
private static int soundThreshold = 90;
|
... | ... | @@ -111,7 +103,7 @@ public class SoundCtrCar |
|
|
```
|
|
|
|
|
|
#### Conclusion
|
|
|
|
|
|
As seen in the above code snippet we implemented a ButtonListener that didn't interfere with anything else.
|
|
|
|
|
|
### Exercise 5 - Clap Controlled Car
|
|
|
|
... | ... | |