From 88470edf159ef662886a4af9dc782fe173e196bf Mon Sep 17 00:00:00 2001
From: Micah Elizabeth Scott <micah@scanlime.org>
Date: Thu, 13 Feb 2014 10:39:58 -0800
Subject: [PATCH] Add a really simple burn-in test helper

---
 examples/python/burnin.py | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
 create mode 100755 examples/python/burnin.py

diff --git a/examples/python/burnin.py b/examples/python/burnin.py
new file mode 100755
index 0000000..3e72621
--- /dev/null
+++ b/examples/python/burnin.py
@@ -0,0 +1,18 @@
+#!/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) 
-- 
GitLab