3 bottom_right_reds
= [tree2
.RR1
, tree2
.RR2
, tree2
.RR3
, tree2
.RR4
, tree2
.RR5
, tree2
.RR6
]
4 bottom_left_reds
= [tree2
.LR1
, tree2
.LR2
, tree2
.LR3
, tree2
.LR4
, tree2
.LR5
, tree2
.LR6
]
6 # note that we must tell setup() that we have a bicolour LED
7 tree2
.setup() # you must always call setup() first!
9 # All the red LEDs will be permanently illuminated and we rotate
10 # between the various colours for the bicolour LED at the top.
11 for i
in range(1): # repeat 7 times
12 tree2
.leds_on_and_wait(bottom_right_reds
, 0.8) # top LED off
13 tree2
.leds_on_and_wait(bottom_right_reds
+ [tree2
.LBG
], 0.8) # top LED green
14 tree2
.leds_on_and_wait(bottom_right_reds
+ [tree2
.LBR
], 0.8) # top LED green
15 tree2
.leds_on_and_wait(bottom_right_reds
+ [tree2
.LBA
], 0.8) # top LED green
17 tree2
.leds_on_and_wait([], 0.8) # all LEDs off
19 tree2
.leds_on_and_wait(bottom_left_reds
, 0.8) # top LED off
20 tree2
.leds_on_and_wait(bottom_left_reds
+ [tree2
.RBG
], 0.8) # top LED green
21 tree2
.leds_on_and_wait(bottom_left_reds
+ [tree2
.RBR
], 0.8) # top LED green
22 tree2
.leds_on_and_wait(bottom_left_reds
+ [tree2
.RBA
], 0.8) # top LED green
24 tree2
.all_leds_off() # extinguish all LEDs
27 tree2
.cleanup() # call cleanup() at the end