public class EV3TouchSensor extends BaseSensor
leJOS conventions for
SampleProviders
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
LEGO_EV3_TOUCH |
currentMode, modes, SWITCH_DELAY
LEGO_ANALOG_SENSOR, LEGO_I2C, LEGO_UART_SENSOR, SENSOR_MODE, SENSOR_MODES
ADDRESS, CURRENT_PLATFORM, DEVICE, ev3DevProperties, LEGO_PORT, LEGO_SENSOR, MODE, PATH_DEVICE
Constructor and Description |
---|
EV3TouchSensor(Port portName) |
Modifier and Type | Method and Description |
---|---|
SensorMode |
getTouchMode()
Lego EV3 Touch sensors, Touch mode
Detects when its front button is pressed |
boolean |
isPressed() |
fetchSample, getAvailableModes, getCurrentMode, getMode, getMode, getModeCount, getName, getSystemMode, sampleSize, setCurrentMode, setCurrentMode, setModes, switchMode
detect, getIntegerAttribute, getStringAttribute, setIntegerAttribute, setStringAttribute
private static final java.lang.String LEGO_EV3_TOUCH
public SensorMode getTouchMode()
Size and content of the sample
The sample contains one element, a value of 0 indicates that the button is not presse, a value of 1 indicates the button is pressed.
leJOS conventions for
SampleProviders
public boolean isPressed()