21 lines
491 B
Python
21 lines
491 B
Python
from master import ColourArray
|
|
from time import sleep
|
|
import sys
|
|
import random
|
|
|
|
c = ColourArray(iplist=('192.168.1.1', ))
|
|
|
|
one = [0,255,255]
|
|
zero = [255,255,0]
|
|
|
|
defaultArray = [[zero.copy(),zero.copy(),zero.copy(),zero.copy(),zero.copy(),zero.copy(),zero.copy(),zero.copy(),zero.copy(),zero.copy(),zero.copy(),zero.copy()]]
|
|
|
|
num = random.randint(0,12)
|
|
|
|
array = defaultArray.copy()
|
|
array[0] = defaultArray[0].copy()
|
|
for i in range(num):
|
|
array[0][i] = one
|
|
c.send(array)
|
|
sleep(0.1)
|