# ------------------------------- # Main Program # ------------------------------- while True: # run this loop for ever. print ("Set every LED to Red") # this is just a comment # Red # as is this fill((LUMAR, 0, 0)) # fill (LUMAR, 0, 0) calls the fill function we defined above and sets the # data value passed to the color variable to LUMAR (which we defined as a # value of 8 at the start of this code so color now = (8, 0 ,0) as these # LEDs are R, G, B this means set LEDs to all red, no green, no blue. time.sleep(1) # Wait for 1 second. # Now we will repeat what we did for Red (255, 0, 0) for Green (0, 255, 0), Blue (0, 0, 255), # White (255, 255, 255) then Off (0, 0, 0). print ("Set every LED to Green") # Green fill((0, LUMAG, 0)) time.sleep(1) print ("Set every LED to Blue") # Blue fill((0, 0, LUMAB)) time.sleep(1) print ("Set every LED to White") # White fill((LUMAR, LUMAG, LUMAB)) time.sleep(1) print ("Clear all LEDs") # Off clear() time.sleep(0.5)