From 682713ff1c6ce54282d839e2f8d3e21a05bb8713 Mon Sep 17 00:00:00 2001 From: Clare Macrae Date: Mon, 18 Jan 2021 16:37:23 +0000 Subject: [PATCH] Speed up theaterChaseRainbow() By making it do the same number of iterations as the almost-identical theaterChase() See #3 --- demo.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/demo.py b/demo.py index 56e1f67..1c8b0b2 100644 --- a/demo.py +++ b/demo.py @@ -74,9 +74,9 @@ def rainbowCycle(strip, wait_ms=10, iterations=5): time.sleep(wait_ms / 1000.0) -def theaterChaseRainbow(strip, wait_ms=50): +def theaterChaseRainbow(strip, wait_ms=50, iterations=10): """Rainbow movie theater light style chaser animation.""" - for j in range(256): + for j in range(iterations): for q in range(3): for i in range(0, strip.numPixels(), 3): strip.setPixelColor(i + q, wheel((i + j) % 255))