Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/pybot/drivers/hotplug/modActB.py
diff options
context:
space:
mode:
authorAlan Aguiar <alanjas@hotmail.com>2013-10-16 01:22:25 (GMT)
committer Alan Aguiar <alanjas@hotmail.com>2013-10-16 01:22:25 (GMT)
commit1bd020d21533f928d0c8b6d48ac04d66f6a1aee4 (patch)
tree3d57253255fe998d7535b3336613178f595a5813 /pybot/drivers/hotplug/modActB.py
parent52fd3338d859c3b4084c74ca068d8ee045cae110 (diff)
update pybotHEADmaster
Diffstat (limited to 'pybot/drivers/hotplug/modActB.py')
-rw-r--r--pybot/drivers/hotplug/modActB.py15
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]
+