Move edge codes to their own file

This commit is contained in:
Glen Whitney 2019-09-27 17:45:39 -04:00
parent 8817603fb1
commit 605080a9db
2 changed files with 35 additions and 33 deletions

33
edgecodes.py Normal file
View File

@ -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';

View File

@ -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 ]