soundsensor
Dies ist eine alte Version des Dokuments!
Soundsensor
Beispiel
Listing 1: HalloMotor
import lejos.nxt.*;
public class HalloSoundSensor {
public static void main(String[] args) throws Exception {
SoundSensor sound = new SoundSensor(SensorPort.S1);
while (!Button.ESCAPE.isPressed()) {
LCD.clear();
for (int i = 0; i < 100; i++) {
LCD.setPixel(1, i, 60 - (sound.readValue() / 2));
Thread.sleep(29);
}
}
}
}
soundsensor.1706257189.txt.gz · Zuletzt geändert: von torsten.roehl
