summaryrefslogtreecommitdiffstats
path: root/jds6600
diff options
context:
space:
mode:
authorEddy Pedroni <eddy@0xf7.com>2022-05-22 15:29:34 +0200
committerEddy Pedroni <eddy@0xf7.com>2022-05-22 15:29:34 +0200
commit74b1db7030ae538c177a1db205849d2e30dc0b8b (patch)
tree8771a7ba201b6ae2d3c7cb11bd93d0854c660d23 /jds6600
Initial commit, added documentation and basic python boilerplate for JDS6600
Diffstat (limited to 'jds6600')
-rw-r--r--jds6600/JT-JDS6600-Communication-protocol.pdfbin0 -> 227870 bytes
-rw-r--r--jds6600/all-off.bin1
-rw-r--r--jds6600/all-on.bin1
-rw-r--r--jds6600/control.py8
-rwxr-xr-xjds6600/stty-config3
5 files changed, 13 insertions, 0 deletions
diff --git a/jds6600/JT-JDS6600-Communication-protocol.pdf b/jds6600/JT-JDS6600-Communication-protocol.pdf
new file mode 100644
index 0000000..f999813
--- /dev/null
+++ b/jds6600/JT-JDS6600-Communication-protocol.pdf
Binary files differ
diff --git a/jds6600/all-off.bin b/jds6600/all-off.bin
new file mode 100644
index 0000000..f04d91b
--- /dev/null
+++ b/jds6600/all-off.bin
@@ -0,0 +1 @@
+:w20=0,0.
diff --git a/jds6600/all-on.bin b/jds6600/all-on.bin
new file mode 100644
index 0000000..55e9577
--- /dev/null
+++ b/jds6600/all-on.bin
@@ -0,0 +1 @@
+:w20=1,1.
diff --git a/jds6600/control.py b/jds6600/control.py
new file mode 100644
index 0000000..bf7b427
--- /dev/null
+++ b/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")
diff --git a/jds6600/stty-config b/jds6600/stty-config
new file mode 100755
index 0000000..4217c48
--- /dev/null
+++ b/jds6600/stty-config
@@ -0,0 +1,3 @@
+#!/usr/bin/zsh
+
+stty -F /dev/ttyUSB0 speed 115200 cs8 -cstopb -parenb -echo