RoboidControl-python/Things/TouchSensor.py
2025-03-11 17:34:23 +01:00

17 lines
494 B
Python

from Thing import Thing
class TouchSensor(Thing):
"""! A sensor which can detect touches
"""
def __init__(self, owner, parent):
"""! Create a touch sensor
"""
super().__init__(owner, parent)
## Value which is true when the sensor is touching something, false otherwise
self.touched_somthing = False
def ProcessBinary(bytes):
"""! Function to extract the touch state received in a binary message
"""
pass