# use this script to make L2 controller a simple # "command triggered" waterfall LED strip # after configured, send "load /c/run" command to start # use ShellLab Testbench App to run this script # download at www.linkongsoft.com/shell-lab/ strap_length = 30 # total length delay_ms = 100 # movement delay in ms steps = 10 # length of water bar color = 0xFF0000 # red bar fcfs = Utils.FCFS() fcfs.appendFile("run", '''\ L -l{delay_ms} -n{steps} W -w -f {color} L -l{delay_ms} -n{strap_length} W -w -f 0 '''.format(delay_ms=delay_ms, steps=steps, color=color, strap_length=strap_length)) fcfs.appendFile("init", '''\ W -I -l{strap_length} '''.format(strap_length=strap_length)) s = ShellLabStrip(PORT) s.fcfsFormat() s.fcfsProgram(fcfs.generate()) s.port.write('reboot\n') # wait for reboot and test the effect time.sleep(0.5) s.disconnect() s.connect() s.writeCommand('load /c/run')