25 lines
417 B
Python
Executable file
25 lines
417 B
Python
Executable file
#!/usr/bin/env python
|
|
|
|
import sk6812
|
|
import time
|
|
import random
|
|
|
|
s = sk6812.SK6812("zybot", 2703)
|
|
s.set_fadestep(2)
|
|
|
|
# dictionary which maps {module: [r, g, b]}
|
|
set_colors = {}
|
|
|
|
while True:
|
|
r = random.randint(0, 254)
|
|
g = random.randint(0, 254)
|
|
b = random.randint(0, 254)
|
|
w = random.randint(0, 254)
|
|
|
|
for i in range(300):
|
|
s.fade_color(i, r, g, b, w)
|
|
s.commit()
|
|
time.sleep(0.01)
|
|
|
|
#time.sleep(120)
|