|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnl.tue.id.creapro.admoveo.Sensor
public abstract class Sensor
Models the sensors on the AdMoVeo robot.
Constructor Summary | |
---|---|
Sensor(Arduino arduino,
int pin)
Creates a Sensor that is connected to a particular pin on the Arduino board. |
Method Summary | |
---|---|
void |
addSensorListener(SensorListener listener)
Adds a sensor listener to this sensor. |
void |
disable()
Disables the sensor. |
void |
enable()
Enables the sensor input. |
int |
getPin()
Gets the pin to which this sensor is connected. |
static java.util.Vector |
getSensors()
Gets all the available sensors. |
boolean |
isEnabled()
|
void |
removeSensorListener(SensorListener listener)
Removes a sensor listener from the list of listeners. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface nl.tue.id.creapro.arduino.ArduinoListener |
---|
analogAvailabe, digitalAvailable |
Constructor Detail |
---|
public Sensor(Arduino arduino, int pin)
arduino
- the Arduino board.pin
- the pin to which this sensor is connected.Method Detail |
---|
public void addSensorListener(SensorListener listener)
listener
- the listener to be added.public void disable()
SensorControl
disable
in interface SensorControl
public void enable()
SensorControl
enable
in interface SensorControl
public int getPin()
public static java.util.Vector getSensors()
public boolean isEnabled()
isEnabled
in interface SensorControl
public void removeSensorListener(SensorListener listener)
listener
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |