Commit af0078ad authored by Fjen Undso's avatar Fjen Undso
Browse files

lights: test every color

parent f41f600e
......@@ -87,8 +87,16 @@ def make_stripe_data(pixellist):
pixellist += missing_pixels * [0]
return pixel2bytes(pixellist)
def test(colors):
"""Test colors by bruteforcing sequence numbers."""
for i in range(128):
send_broadcast(colors)
if __name__ == '__main__':
colors = make_stripe_data([0, 255, 255, 0] * 24)
for i in range(128): # bruteforce sequence numbers
send_broadcast(colors)
test(make_stripe_data([255, 0, 0, 0] * LED_NUM)
time.sleep(1)
test(make_stripe_data([0, 255, 0, 0] * LED_NUM)
time.sleep(1)
test(make_stripe_data([0, 0, 255, 0] * LED_NUM)
time.sleep(1)
test(make_stripe_data([0, 0, 0, 255] * LED_NUM)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment