EV3TouchSensor#
- class EV3TouchSensor(pin)#
Digital touch sensor helper for an EV3-style touch input.
- getButton()#
Read the raw input level from the touch sensor pin.
- Returns:
1when the input is high,0when it is low.
- isPressed()#
Check whether the touch sensor is currently pressed.
- Returns:
Boolean
Truewhen pressed.
- isReleased()#
Check whether the touch sensor is currently released.
- Returns:
Boolean
Truewhen released.
- waitForPress(debouncems=200)#
Block until the sensor is pressed, then wait for the debounce period.
- Returns:
None.
- waitForRelease(debouncems=200)#
Block until the sensor is released, then wait for the debounce period.
- Returns:
None.
- waitForBump(debouncems=200)#
Block until the sensor is pressed and released.
- Returns:
None.