diff options
Diffstat (limited to 'doc/jds6600/control.py')
-rw-r--r-- | doc/jds6600/control.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/doc/jds6600/control.py b/doc/jds6600/control.py new file mode 100644 index 0000000..bf7b427 --- /dev/null +++ b/doc/jds6600/control.py @@ -0,0 +1,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") |