From 32ba287f5f18e8896d2e8b503b021dcef851da18 Mon Sep 17 00:00:00 2001 From: jordandll <67916736+jordandll@users.noreply.github.com> Date: Wed, 3 Nov 2021 23:35:32 -0400 Subject: [PATCH] Update christmastree.py Partitioned the tuple of Led objects returned by LedCollection.leds into two tuples: One for red LEDs; the other, for green LEDs. --- christmastree.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/christmastree.py b/christmastree.py index 881fd04..086cca7 100644 --- a/christmastree.py +++ b/christmastree.py @@ -30,4 +30,7 @@ def __init__(self, pwm=False, initial_value=False, pin_factory=None): _order=('baubles', 'star'), pin_factory=pin_factory ) + + self.red_leds = tuple(self.leds[i] for i in [1, 3, 4, 6, 8]) + self.green_leds = tuple(self.leds[i] for i in [0, 2, 5, 7])