public class UltrasonicAdapter extends java.lang.Object implements UltrasonicListener
Constructor and Description |
---|
UltrasonicAdapter() |
Modifier and Type | Method and Description |
---|---|
void |
far(SensorPort port,
int value)
Empty method called when the distance exceeds the trigger level.
|
void |
near(SensorPort port,
int value)
Empty method called when the distance falls below the trigger level.
|
public void far(SensorPort port, int value)
far
in interface UltrasonicListener
port
- the port where the sensor is plugged invalue
- the current distancepublic void near(SensorPort port, int value)
near
in interface UltrasonicListener
port
- the port where the sensor is plugged invalue
- the current distance