1 package nl
.ru
.des
.sensors
;
3 import lejos
.hardware
.Button
;
4 import lejos
.hardware
.sensor
.EV3UltrasonicSensor
;
5 import nl
.ru
.des
.LCDPrinter
;
7 public class UltraSoneSensor
extends SuperSensor
{
10 public UltraSoneSensor(EV3UltrasonicSensor ultraSone
) {
11 super(ultraSone
.getDistanceMode());
15 private void calibrate(){
16 LCDPrinter
.print("Calibrate ultrasone, place object in the turn radius...");
17 Button
.waitForAnyPress();
20 LCDPrinter
.print("Limit: " + limit
);
23 public boolean getCurrentStatus(){
25 return samples
[0]<limit
;