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