diff options
Diffstat (limited to 'pybot/drivers/hotplug/modSenB.py')
-rw-r--r-- | pybot/drivers/hotplug/modSenB.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/pybot/drivers/hotplug/modSenB.py b/pybot/drivers/hotplug/modSenB.py new file mode 100644 index 0000000..6148171 --- /dev/null +++ b/pybot/drivers/hotplug/modSenB.py @@ -0,0 +1,14 @@ + +RD_VERSION = 0x00 +GET_VALUE = 0x01 + +def getVersion(dev): + dev.send([RD_VERSION]) + raw = dev.read(3) + return raw[1] + raw[2] * 256 + +def getValue(dev): + dev.send([GET_VALUE]) + raw = dev.read(3) + return raw[1] + raw[2] * 256 + |