TOP Smart RGB LED Demo 2

This program uses the TOPs RGB LED to slowly display red, green and blue colors one after the other.

Program


---

TOP Smart RGB LED Demo 2

This program uses the TOP's RGB LED to slowly display

red, green and blue colors one after the other.

---


prog_vars =

d/count 0

d/led_red 0

d/led_green 0

d/led_blue 0

prog_vars.


prog_start =

pclear

sledn 1

print "Smart RGB Demo 2: Start"

prog_start.


prog_loop =


-- main program loop

-- red

repeat 255 ->

-- display the color

sled 1 /led_red /led_green /led_blue

inc /led_red 1

repeat.

/led_red 0

-- green

repeat 255 ->

-- display the color

sled 1 /led_red /led_green /led_blue

inc /led_green 1

repeat.

/led_green 0

-- blue

repeat 255 ->

-- display the color

sled 1 /led_red /led_green /led_blue

inc /led_blue 1

repeat.

exitprog

prog_loop.

prog_stop =

print "Bye"

sledoff

prog_stop.