[REBOL] Re: changing color of LED
From: SunandaDH:aol at: 2-Jan-2004 15:42
> Therefore I used leds (indicator lights) with the colors red and green.
> After purging old stuff from my disc I lost this reblet, too. So I can't
> remember how I did changed the color of single leds.
Two functions and a demo:
Flip-LED: func [led [object!]]
led/data: not led/data
change-led: func [led [object!] color1 [tuple!] color2 [tuple!]]
led/colors: reduce [color1 color2]
view layout [
button "flicker" [
loop 5 [wait (random 10) / 100
button "change colors" [
change-led l1 random/secure 255.255.255