Package lejos.nxt

Examples of lejos.nxt.SoundSensor.readValue()


    SoundSensor soundSensor = new SoundSensor(SensorPort.S1);
   
    int sensorValue;
    for (int i = 1; i <= anzahlMessungen; i++) {
      long startTime = System.currentTimeMillis();
      sensorValue = soundSensor.readValue();
      System.out.println("Messung Nr. " + i + "\tergab Lautst�rke von "
          + sensorValue + "% " + "\t(Messdauer: "
          + (System.currentTimeMillis() - startTime) + "ms)");
    }
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.