options = { 'num_led': args.num_led, 'mosi': args.mosi, 'sclk': args.sclk, } if 0 in args.patterns: # One Cycle with one step and a pause of theee seconds. Hence three seconds of white light print('Three Seconds of white light') MY_CYCLE = colorschemes.Solid(duration_s=3, **options) MY_CYCLE.start() if 1 in args.patterns: # Go twice around the clock print('Go twice around the clock') MY_CYCLE = colorschemes.RoundAndRound( num_steps_per_cycle=options['num_led'], num_cycles=2, **options) MY_CYCLE.start() if 2 in args.patterns: # One cycle of red, green and blue each print('One strandtest of red, green and blue each') MY_CYCLE = colorschemes.StrandTest( num_steps_per_cycle=options['num_led'], num_cycles=3, **options) MY_CYCLE.start() if 3 in args.patterns: # One slow trip through the rainbow print('One slow trip through the rainbow') MY_CYCLE = ColorCycleTemplate(num_steps_per_cycle=255, num_cycles=1, **options)
def clock(): # Go twice around the clock print('Go twice around the clock') MY_CYCLE = colorschemes.RoundAndRound(num_leds=NUM_LEDS, pause_value=0, num_steps_per_cycle=NUM_LEDS, num_cycles=2) order = "rbg", MY_CYCLE.start()
NUM_LED = 18 while True: # One Cycle with one step and a pause of theee seconds. Hence three seconds of white light print('Three Seconds of white light') MY_CYCLE = colorschemes.Solid(num_led=NUM_LED, pause_value=5, num_steps_per_cycle=1, num_cycles=1) MY_CYCLE.start() # Go twice around the clock print('Go twice around the clock') MY_CYCLE = colorschemes.RoundAndRound(num_led=NUM_LED, pause_value=.05, num_steps_per_cycle=NUM_LED, num_cycles=5) MY_CYCLE.start() # One cycle of red, green and blue each print('One strandtest of red, green and blue each') MY_CYCLE = colorschemes.StrandTest(num_led=NUM_LED, pause_value=.05, num_steps_per_cycle=NUM_LED, num_cycles=5) MY_CYCLE.start() # One slow trip through the rainbow print('One slow trip through the rainbow') MY_CYCLE = colorschemes.Rainbow(num_led=NUM_LED, pause_value=0,
import colorschemes numLEDs = 430 # One Cycle with one step and a pause of one second. Hence one second of white light myCycle = colorschemes.Solid(numLEDs=numLEDs, pauseValue=1, numStepsPerCycle=1, numCycles=1) myCycle.start() # Go twice around the clock myCycle = colorschemes.RoundAndRound(numLEDs=numLEDs, pauseValue=0, numStepsPerCycle=numLEDs, numCycles=2) myCycle.start() # One cycle of red, green and blue each myCycle = colorschemes.StrandTest(numLEDs=numLEDs, pauseValue=0, numStepsPerCycle=numLEDs, numCycles=3, globalBrightness=10) myCycle.start() # Two slow trips through the rainbow myCycle = colorschemes.Rainbow(numLEDs=numLEDs, pauseValue=0, numStepsPerCycle=255, numCycles=2, globalBrightness=10) myCycle.start() # Five quick trips through the rainbow