changing color of LED
[1/3] from: rene::villa-cossio::com at: 2-Jan-2004 21:15
Hi there,
long time ago I wrote a reblet to show the status of database-connections.
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.
Yes, to much alkohol and parties...I forget everything.....
cheers
Rene
--
Rene Schrader-Boelsche rene<at>villa-cossio.com
Heidberg 12 www.villa-cossio.com
D-24641 Stuvenborn +49 171 5482906<
[2/3] from: SunandaDH:aol at: 2-Jan-2004 15:42
Hi Rene:
> 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
show led
]
change-led: func [led [object!] color1 [tuple!] color2 [tuple!]]
[
led/colors: reduce [color1 color2]
led/data: true
Show led
]
unview/all
view layout [
l1: led
button "flicker" [
loop 5 [wait (random 10) / 100
Flip-LED l1
]
]
button "change colors" [
change-led l1 random/secure 255.255.255
random/secure 128.128.128
]
]
Sunanda<
[3/3] from: rene:villa-cossio at: 2-Jan-2004 22:01
> Flip-LED: func [led [object!]]
> [
> led/data: not led/data
> show led
> ]
Yes! Super! Thank you very much...
René
--
Rene Schrader-Boelsche rene<at>villa-cossio.com
Heidberg 12 www.villa-cossio.com
D-24641 Stuvenborn +49 (0)4194 988570<