This program works with a strip of 8 smart RGB leds connected to the SLED pin on port E (pin E1 in some models.) It randomly chnages the color of each LED.
Program
---
sled Example Light Program
This program works with a strip of 8 smart RGB leds
connected to the SLED pin on port E (pin E1 in some models.)
It randomly chnages the color of each LED.
---
prog_vars =
d/count 0
d/led_no 1
d/color 0
d/no_of_leds 8
prog_vars.
prog_start =
print "Program Start"
-- Set the number of LEDS
sledn /no_of_leds
prog_start.
prog_loop =
-- main program loop
print "Count /count"
inc /count
any /count >= 1000 -> exitprog
-- Set a random color
rand 0 15 -> /color
-- Set the led
sled /led_no /color
inc /led_no
-- Return to first led.
any /led_no > 8 -> /led_no 1
prog_loop.
prog_stop =
print "Bye"
prog_stop.