summaryrefslogtreecommitdiffstats
path: root/doc/jds6600/control.py
blob: bf7b42790a1d9e9d104e5e3b75ca5731c1b6c283 (plain)
1
2
3
4
5
6
7
8
class OpCode:
    ONOFF = "w20"

def sendCommand(opcode, args):
    with open("/dev/ttyUSB0", "w") as tty:
        print(f":{opcode}={args}.", end="\r\n", file=tty)

sendCommand(OpCode.ONOFF, "1,0")