3 # Some constants to identify each LED
11 ALL
= 1+2+4+8+16+32+64
14 tree
.setup() # you must always call setup() first!
16 # Pattern: all LEDs illuminated except for one each time
18 for i
in range(3): # repeat 3 times
19 tree
.leds_on_and_wait(ALL
-L0
, 0.5) # all on except for LED 0
20 tree
.leds_on_and_wait(ALL
-L1
, 0.5) # all on except for LED 1
21 tree
.leds_on_and_wait(ALL
-L2
, 0.5) # etc.
22 tree
.leds_on_and_wait(ALL
-L3
, 0.5)
23 tree
.leds_on_and_wait(ALL
-L4
, 0.5)
24 tree
.leds_on_and_wait(ALL
-L5
, 0.5)
25 tree
.leds_on_and_wait(ALL
-L6
, 0.5)
28 tree
.all_leds_off() # extinguish all LEDs
31 tree
.cleanup() # call cleanup() at the end