Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

relay on

  • Loading branch information...
commit 7b1d819848ecf30b77dfdebe2d65cf66c38dee1b 1 parent 6df3ae4
@phooky phooky authored
Showing with 7 additions and 5 deletions.
  1. +7 −5 scripts/panels.py
View
12 scripts/panels.py
@@ -39,16 +39,18 @@ def close(self):
self.serialPort.close()
panels = [None]*3
-for port in range(0,2):
+for port in range(0,3):
name = "/dev/ttyACM{0}".format(port)
p = Panel()
p.open(name)
v = p.command(CC_GET_ID,"",1)
- print("{0} - {1}",name,ord(v[0]))
- p.close()
+ id = ord(v[0])
+ panels[id] = p
+
+panels[0].command(CC_RELAY,struct.pack("B",1),0)
-#for p in panels:
-# p.close()
+for p in panels:
+ p.close()
Please sign in to comment.
Something went wrong with that request. Please try again.