Browse Source

Move edge codes to their own file

master
Glen Whitney 2 years ago
parent
commit
605080a9db
  1. 33
      edgecodes.py
  2. 35
      firestar.py

33
edgecodes.py

@ -0,0 +1,33 @@
# Insert the correct edge codes here
edgecode[ 0] = 'XX';
edgecode[ 1] = 'XX';
edgecode[ 2] = 'XX';
edgecode[ 3] = 'XX';
edgecode[ 4] = 'XX';
edgecode[ 5] = 'XX';
edgecode[ 6] = 'XX';
edgecode[ 7] = 'XX';
edgecode[ 8] = 'XX';
edgecode[ 9] = 'XX';
edgecode[10] = 'XX';
edgecode[11] = 'XX';
edgecode[12] = 'XX';
edgecode[13] = 'XX';
edgecode[14] = 'XX';
edgecode[15] = 'XX';
edgecode[16] = 'XX';
edgecode[17] = 'XX';
edgecode[18] = 'XX';
edgecode[19] = 'XX';
edgecode[20] = 'XX';
edgecode[21] = 'XX';
edgecode[22] = 'XX';
edgecode[23] = 'XX';
edgecode[24] = 'XX';
edgecode[25] = 'XX';
edgecode[26] = 'XX';
edgecode[27] = 'XX';
edgecode[28] = 'XX';
edgecode[29] = 'XX';

35
firestar.py

@ -1,45 +1,14 @@
#!/usr/bin/python3
from phue import Bridge
import time
b = Bridge('172.18.152.190')
b = Bridge('172.18.130.12')
Nedges = 30;
edgecode = [None] * Nedges;
# The edges are numbered as in info/SSDedges.obj; enter the two-letter code for
# the lightstrip inserted through each edge in the block below:
edgecode[ 0] = 'XX';
edgecode[ 1] = 'XX';
edgecode[ 2] = 'XX';
edgecode[ 3] = 'XX';
edgecode[ 4] = 'XX';
edgecode[ 5] = 'XX';
edgecode[ 6] = 'XX';
edgecode[ 7] = 'XX';
edgecode[ 8] = 'XX';
edgecode[ 9] = 'XX';
edgecode[10] = 'XX';
edgecode[11] = 'XX';
edgecode[12] = 'XX';
edgecode[13] = 'XX';
edgecode[14] = 'XX';
edgecode[15] = 'XX';
edgecode[16] = 'XX';
edgecode[17] = 'XX';
edgecode[18] = 'XX';
edgecode[19] = 'XX';
edgecode[20] = 'XX';
edgecode[21] = 'XX';
edgecode[22] = 'XX';
edgecode[23] = 'XX';
edgecode[24] = 'XX';
edgecode[25] = 'XX';
edgecode[26] = 'XX';
edgecode[27] = 'XX';
edgecode[28] = 'XX';
edgecode[29] = 'XX';
# End of edge codes; show automation follows
exec(open("edgecodes.py").read())
edges = [ b[code] for code in edgecode ]

Loading…
Cancel
Save