Mercurial > ~darius > hgwebdir.cgi > epro
comparison epro.py @ 13:4450cf739263
Add link to protocol document.
author | Daniel O'Connor <darius@dons.net.au> |
---|---|
date | Mon, 06 Dec 2021 11:25:51 +1030 |
parents | 0a571da65068 |
children | 60ead9b5fc1b |
comparison
equal
deleted
inserted
replaced
12:0a571da65068 | 13:4450cf739263 |
---|---|
22 # 5 yellow RX TTL (5V) | 22 # 5 yellow RX TTL (5V) |
23 # 6 blue VCC (12V) | 23 # 6 blue VCC (12V) |
24 # | 24 # |
25 # 2400bps 8E1 | 25 # 2400bps 8E1 |
26 # s = serial.Serial('/dev/cu.usbserial-AM01Z7TZ', 2400, parity='E') | 26 # s = serial.Serial('/dev/cu.usbserial-AM01Z7TZ', 2400, parity='E') |
27 # | |
28 # Protocol document: https://www.enerdrive.com.au/wp-content/uploads/ePRO-communication-interface-spec-rev.02.pdf | |
27 | 29 |
28 class Packet(object): | 30 class Packet(object): |
29 MSGTYPE = -1 | 31 MSGTYPE = -1 |
30 | 32 |
31 def __init__(self, dstadr, srcadr, devid, msgtype, data): | 33 def __init__(self, dstadr, srcadr, devid, msgtype, data): |