Skip to content
Snippets Groups Projects
Commit 88470edf authored by Micah Elizabeth Scott's avatar Micah Elizabeth Scott
Browse files

Add a really simple burn-in test helper

parent 01a5d215
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env python
# Burn-in test: Keep LEDs at full brightness most of the time, but dim periodically
# so it's clear when there's a problem.
import opc, time, math
numLEDs = 512
client = opc.Client('localhost:7890')
t = 0
while True:
t += 0.4
brightness = int(min(1, 1.25 + math.sin(t)) * 255)
frame = [ (brightness, brightness, brightness) ] * numLEDs
client.put_pixels(frame)
time.sleep(0.05)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment