4 # Some constants to identify each LED
12 ALL
= 1+2+4+8+16+32+64
15 tree
.setup() # you must always call setup() first!
17 # Two slightly different ways of flashing *all* LEDs on and off.
20 for i
in range(3): # repeat 3 times
21 tree
.leds_on_and_wait(ALL
, 0.5) # all on for 0.5s
22 tree
.leds_on_and_wait(NO_LEDS
, 0.5) # all off for 0.5s
25 for i
in range(3): # repeat 3 times
26 tree
.leds_on_and_wait(ALL
, 0.5) # all on for 0.5s
27 tree
.all_leds_off() # extinguish all LEDs
28 time
.sleep(0.5) # wait for 0.5s
31 tree
.all_leds_off() # extinguish all LEDs
34 tree
.cleanup() # call cleanup() at the end