top of page

sled Example Light Program

This program works with a single smart RGB led on the TOP. Connect the SLEDs data pin to the SLED pin on port E (pin E1 in some models). It randomly changes the colour of the LED.

Program


---

sled Example Light Program

This program works with a single smart RGB led on the TOP.

Connect the SLED's data pin to the SLED pin on port E

(pin E1 in some models.)

It randomly change the color of the LED.

---


prog_vars =

d/count 0

d/color 0

prog_vars.


prog_start =

print "Program Start"

-- Set the number of LEDS

sledn 1

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 1 /color

d100


prog_loop.

prog_stop =

print "Bye"

prog_stop.



bottom of page