diff options
author | Alan Aguiar <alanjas@hotmail.com> | 2013-10-16 01:22:25 (GMT) |
---|---|---|
committer | Alan Aguiar <alanjas@hotmail.com> | 2013-10-16 01:22:25 (GMT) |
commit | 1bd020d21533f928d0c8b6d48ac04d66f6a1aee4 (patch) | |
tree | 3d57253255fe998d7535b3336613178f595a5813 /pybot/drivers/hotplug/modSenA.py | |
parent | 52fd3338d859c3b4084c74ca068d8ee045cae110 (diff) |
Diffstat (limited to 'pybot/drivers/hotplug/modSenA.py')
-rw-r--r-- | pybot/drivers/hotplug/modSenA.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/pybot/drivers/hotplug/modSenA.py b/pybot/drivers/hotplug/modSenA.py new file mode 100644 index 0000000..6148171 --- /dev/null +++ b/pybot/drivers/hotplug/modSenA.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 + |