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: two or three LEDs are on at the same time.
17 # Note that each pair is on for 0.4 seconds
19 for i
in range(7): # repeat the pattern 7 times
20 tree
.leds_on_and_wait(L1
+L4
, 0.4) # LED 1 and LED 4
21 tree
.leds_on_and_wait(L5
+L3
+L0
, 0.4) # LEDs 5, 3 and 0
22 tree
.leds_on_and_wait(L2
+L6
, 0.4) # LEDs 2 and 6
23 tree
.leds_on_and_wait(L5
+L3
+L0
, 0.4) # LEDs 5, 3 and 0
26 tree
.all_leds_off() # extinguish all LEDs
29 tree
.cleanup() # call cleanup() at the end