def main(): # Paint white, red, green and blue once for one second print('White, red, green, blue on all LEDs') my_cycle = colorschemes.Solid(num_led=NUM_LED, pause_value=1, order='rgb', num_steps_per_cycle=4, num_cycles=1, bus_method='bitbang', mosi=MOSI, sclk=SCLK, global_brightness=BRIGHTNESS) my_cycle.start() # Five trips through the rainbow print('Five trips through the rainbow') my_cycle = colorschemes.Rainbow(num_led=NUM_LED, pause_value=0, order='rgb', num_steps_per_cycle=255, num_cycles=5, bus_method='bitbang', mosi=MOSI, sclk=SCLK, global_brightness=BRIGHTNESS) my_cycle.start() print('Finished the test')
def run(self): print("Value send", self.h) MY_CYCLE = colorschemes.Solid(num_led=NUM_LED, pause_value=3, num_steps_per_cycle=1, num_cycles=1) # One slow trip through the rainbow #MY_CYCLE = colorschemes.Rainbow(num_led=NUM_LED, pause_value=0.03, num_steps_per_cycle=34, num_cycles=5)
def main(): # One Cycle with one step and a pause of three seconds. Hence three seconds of white light print('Three Seconds of white light') my_cycle = colorschemes.Solid(num_led=NUM_LED, pause_value=3, num_steps_per_cycle=1, num_cycles=1, order='rgb', global_brightness=BRIGHTNESS) my_cycle.start() # Go twice around the clock print('Go twice around the clock') my_cycle = colorschemes.RoundAndRound(num_led=NUM_LED, pause_value=0, num_steps_per_cycle=NUM_LED, num_cycles=2, order='rgb', global_brightness=BRIGHTNESS) 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=0, num_steps_per_cycle=NUM_LED, num_cycles=3, order='rgb', global_brightness=BRIGHTNESS) 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, num_steps_per_cycle=255, num_cycles=1, order='rgb', global_brightness=BRIGHTNESS) my_cycle.start() # Five quick trips through the rainbow print('Five quick trips through the rainbow') my_cycle = colorschemes.TheaterChase(num_led=NUM_LED, pause_value=0.04, num_steps_per_cycle=35, num_cycles=5, order='rgb', global_brightness=BRIGHTNESS) my_cycle.start() print('Finished the test')
#!/usr/bin/env python3 """Sample script to run a few colour tests on the strip.""" from apa102_pi.colorschemes import colorschemes NUM_LED = 576 # One Cycle with one step and a pause of three seconds. Hence three seconds of white light print('Three Seconds of white light') MY_CYCLE = colorschemes.Solid(num_led=NUM_LED, pause_value=3, num_steps_per_cycle=1, num_cycles=1, order='rgb') MY_CYCLE.start() # Go twice around the clock print('Go twice around the clock') MY_CYCLE = colorschemes.RoundAndRound(num_led=NUM_LED, pause_value=0, num_steps_per_cycle=NUM_LED, num_cycles=2, order='rgb') 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=0, num_steps_per_cycle=NUM_LED, num_cycles=3, order='rgb')
#!/usr/bin/env python3 """Sample script to run a few colour tests on a Pimoroni Blinkt!.""" from apa102_pi.colorschemes import colorschemes NUM_LED = 8 MOSI = 23 # Hardware SPI uses BCM 10 & 11. Change these values for bit bang mode SCLK = 24 # e.g. MOSI = 23, SCLK = 24 for Pimoroni Phat Beat or Blinkt! # Paint white, red, green and blue once for one second print('White, red, green, blue on all LEDs') MY_CYCLE = colorschemes.Solid(num_led=NUM_LED, pause_value=1, order='rgb', num_steps_per_cycle=4, num_cycles=1, mosi=MOSI, sclk=SCLK) MY_CYCLE.start() # Five trips through the rainbow print('Five trips through the rainbow') MY_CYCLE = colorschemes.Rainbow(num_led=NUM_LED, pause_value=0, order='rgb', num_steps_per_cycle=255, num_cycles=5, mosi=MOSI, sclk=SCLK) MY_CYCLE.start() print('Finished the test')