
Originally Posted by
peu
bingo
Thanks
not that bingo after all... 
Here is the full code:
Code:
trisio =%00000000
ansel =%00000000
conta var byte
ciclos var byte
pasos var byte
red var gpio.1
green var gpio.2
blue var gpio.4
'pote var gpio.0
ciclos =10
low red
high blue
high green
pasos =16
loop:
'ADCIN pote, pasos
for conta=0 to 255 step pasos 'blue fall
pwm blue, 255-conta, ciclos
next conta
low blue
for conta=0 to 255 step pasos 'red rise
pwm red, conta, ciclos
next conta
high red
for conta=0 to 255 step pasos 'green fall
pwm green, 255-conta, ciclos
next conta
low green
for conta=0 to 255 step pasos 'blue rise
pwm blue, conta, ciclos
next conta
high blue
for conta=0 to 255 step pasos 'red fall
pwm red, 255-conta, ciclos
next conta
low red
for conta=0 to 255 step pasos 'green rise
pwm green, conta, ciclos
next conta
high green
goto loop
end
red is supposed to stay high until the for-next that put it back to low, but as soon the rise for-next is finished it goes off.
any idea?
Pablo
Bookmarks