Program Help
rr
Posts: 63
Hello,
·
I·am using a potentiometer and a pwm co-processor to control the·output of some red, green, and blue leds. Using the output from the r/c time command I am selecting different colors to send to the pwm coprocessor. Right now everything works pretty well, but I know my program could be improved. Any ideas on how to output some usable numbers instead of selecting the color from a list? Theoretically, I can display millions of colors but my current program can only display 47.
·
Any help would be appreciated...
rr
·
I·am using a potentiometer and a pwm co-processor to control the·output of some red, green, and blue leds. Using the output from the r/c time command I am selecting different colors to send to the pwm coprocessor. Right now everything works pretty well, but I know my program could be improved. Any ideas on how to output some usable numbers instead of selecting the color from a list? Theoretically, I can display millions of colors but my current program can only display 47.
·
Any help would be appreciated...
rr
Comments
so you can have 3 var, one for each color,
for a simple test , try:
g=80
b=120
DO
FOR r=0 to 255
RANDOM g
RANDOM b
SEROUT 7, baud, [noparse][[/noparse]$2F, b]
SEROUT 7, baud, [noparse][[/noparse]$2D, g]
SEROUT 7, baud, [noparse][[/noparse]$2B, r]
PAUSE 1
NEXT
LOOP
just to see if you have a bunch of colors flashing without control !
Amaral