diff --git a/__pycache__/master.cpython-37.pyc b/__pycache__/master.cpython-37.pyc deleted file mode 100644 index eb82a52..0000000 Binary files a/__pycache__/master.cpython-37.pyc and /dev/null differ diff --git a/master.py b/master.py index c7bfa71..20b2869 100644 --- a/master.py +++ b/master.py @@ -4,7 +4,7 @@ import sys def eprint(*args, **kwargs): print(*args, file=sys.stderr, **kwargs) -iplist = ('192.168.1.1') +iplist = ('192.168.1.1','192.168.1.211','192.168.1.109','192.168.1.178','192.168.1.244','192.168.1.179','192.168.1.196','192.168.1.133','192.168.1.217') class ColourArray: diff --git a/test-one.py b/test-one.py new file mode 100644 index 0000000..00ae227 --- /dev/null +++ b/test-one.py @@ -0,0 +1,15 @@ +from master import ColourArray +from time import sleep + +testColorData = [[[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255]]] +colorful = [[[255,0,255],[0,255,255],[255,255,0],[0,0,255],[255,0,0],[0,255,0],[255,255,255],[255,0,255],[0,255,255],[255,255,0],[0,0,255],[255,0,0]]] +rainbow = [[[255,0,0],[255,127,0],[255,255,0],[127,255,0],[0,255,0],[0,255,127],[0,255,255],[0,127,255],[0,0,255],[255,0,255]]] + +c = ColourArray(iplist=('192.168.1.1', )) +while True: + c.send(testColorData) + sleep(2) + c.send(colorful) + sleep(2) + c.send(rainbow) + sleep(2) diff --git a/test.py b/test.py index 00ae227..d82b4b0 100644 --- a/test.py +++ b/test.py @@ -1,11 +1,35 @@ from master import ColourArray from time import sleep -testColorData = [[[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255]]] -colorful = [[[255,0,255],[0,255,255],[255,255,0],[0,0,255],[255,0,0],[0,255,0],[255,255,255],[255,0,255],[0,255,255],[255,255,0],[0,0,255],[255,0,0]]] -rainbow = [[[255,0,0],[255,127,0],[255,255,0],[127,255,0],[0,255,0],[0,255,127],[0,255,255],[0,127,255],[0,0,255],[255,0,255]]] +testColorData = [[[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255]], + [[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255]], + [[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255]], + [[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255]], + [[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255]], + [[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255]], + [[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255]], + [[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255]], + [[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255]]] +colorful = [[[255,0,255],[0,255,255],[255,255,0],[0,0,255],[255,0,0],[0,255,0],[255,255,255],[255,0,255],[0,255,255],[255,255,0],[0,0,255],[255,0,0]], + [[255,0,255],[0,255,255],[255,255,0],[0,0,255],[255,0,0],[0,255,0],[255,255,255],[255,0,255],[0,255,255],[255,255,0],[0,0,255],[255,0,0]], + [[255,0,255],[0,255,255],[255,255,0],[0,0,255],[255,0,0],[0,255,0],[255,255,255],[255,0,255],[0,255,255],[255,255,0],[0,0,255],[255,0,0]], + [[255,0,255],[0,255,255],[255,255,0],[0,0,255],[255,0,0],[0,255,0],[255,255,255],[255,0,255],[0,255,255],[255,255,0],[0,0,255],[255,0,0]], + [[255,0,255],[0,255,255],[255,255,0],[0,0,255],[255,0,0],[0,255,0],[255,255,255],[255,0,255],[0,255,255],[255,255,0],[0,0,255],[255,0,0]], + [[255,0,255],[0,255,255],[255,255,0],[0,0,255],[255,0,0],[0,255,0],[255,255,255],[255,0,255],[0,255,255],[255,255,0],[0,0,255],[255,0,0]], + [[255,0,255],[0,255,255],[255,255,0],[0,0,255],[255,0,0],[0,255,0],[255,255,255],[255,0,255],[0,255,255],[255,255,0],[0,0,255],[255,0,0]], + [[255,0,255],[0,255,255],[255,255,0],[0,0,255],[255,0,0],[0,255,0],[255,255,255],[255,0,255],[0,255,255],[255,255,0],[0,0,255],[255,0,0]], + [[255,0,255],[0,255,255],[255,255,0],[0,0,255],[255,0,0],[0,255,0],[255,255,255],[255,0,255],[0,255,255],[255,255,0],[0,0,255],[255,0,0]]] +rainbow = [[[255,0,0],[255,127,0],[255,255,0],[127,255,0],[0,255,0],[0,255,127],[0,255,255],[0,127,255],[0,0,255],[255,0,255]], + [[255,0,0],[255,127,0],[255,255,0],[127,255,0],[0,255,0],[0,255,127],[0,255,255],[0,127,255],[0,0,255],[255,0,255]], + [[255,0,0],[255,127,0],[255,255,0],[127,255,0],[0,255,0],[0,255,127],[0,255,255],[0,127,255],[0,0,255],[255,0,255]], + [[255,0,0],[255,127,0],[255,255,0],[127,255,0],[0,255,0],[0,255,127],[0,255,255],[0,127,255],[0,0,255],[255,0,255]], + [[255,0,0],[255,127,0],[255,255,0],[127,255,0],[0,255,0],[0,255,127],[0,255,255],[0,127,255],[0,0,255],[255,0,255]], + [[255,0,0],[255,127,0],[255,255,0],[127,255,0],[0,255,0],[0,255,127],[0,255,255],[0,127,255],[0,0,255],[255,0,255]], + [[255,0,0],[255,127,0],[255,255,0],[127,255,0],[0,255,0],[0,255,127],[0,255,255],[0,127,255],[0,0,255],[255,0,255]], + [[255,0,0],[255,127,0],[255,255,0],[127,255,0],[0,255,0],[0,255,127],[0,255,255],[0,127,255],[0,0,255],[255,0,255]], + [[255,0,0],[255,127,0],[255,255,0],[127,255,0],[0,255,0],[0,255,127],[0,255,255],[0,127,255],[0,0,255],[255,0,255]]] -c = ColourArray(iplist=('192.168.1.1', )) +c = ColourArray() while True: c.send(testColorData) sleep(2)