
public class EV3TouchSensor extends BaseSensor
| Supported modes | |||
|---|---|---|---|
| Mode name | Description | unit(s) | Getter |
| Touch | Detects when its front button is pressed | Binary | getTouchMode() |
leJOS conventions for
SampleProviders
| Modifier and Type | Class and Description |
|---|---|
private class |
EV3TouchSensor.TouchMode |
currentMode, currentModeS, modesPATH_DEVICE| Constructor and Description |
|---|
EV3TouchSensor(java.lang.String portName) |
| Modifier and Type | Method and Description |
|---|---|
SensorMode |
getTouchMode()
Lego EV3 Touch sensor, Touch mode
Detects when its front button is pressed 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. |
protected void |
init() |
fetchSample, getAvailableModes, getCurrentMode, getMode, getMode, getModeCount, getName, sampleSize, setCurrentMode, setCurrentMode, setModes, switchMode, switchModeconnect, getIntegerAttribute, getStringAttribute, setIntegerAttribute, setStringAttributegetElements, readFloat, readInteger, readString, writeInteger, writeStringclose, releaseOnCloseprotected void init()
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