use _lm.tempo and set sleep to 0

This commit is contained in:
topsinoty
2025-12-21 16:10:41 +02:00
parent a71201d90a
commit ffa77db057

View File

@@ -8,7 +8,7 @@ def name():
class ChristmasLights(Program): class ChristmasLights(Program):
def run(self, args: [] = None): def run(self, args: [] = None):
# Configuration # Configuration
wait_ms = 100 # Speed of the animation wait_ms = 0 # Speed of the animation
# Define classic festive colors # Define classic festive colors
RED = Color(255, 0, 0) RED = Color(255, 0, 0)
@@ -34,5 +34,5 @@ class ChristmasLights(Program):
# Increment offset to move the lights # Increment offset to move the lights
offset = (offset + 1) % (len(colors) * group_size) offset = (offset + 1) % (len(colors) * group_size)
self._lm.get_tempo().wait()
time.sleep(wait_ms / 1000.0) time.sleep(wait_ms / 1000.0)