Allora prova così:
main:
gpio.0=0
gpio.1=0
gpio.2=0
K=0
trisio.1=0
trisio.2=0
trisio.0=1
cmcon=7
while true
if (gpio.0=1) then
while(gpio.0=1)
delay_ms(100)
wend
K = K+1
if (K>3) then
K=0
end if
end if
if (K=0)...
in questo modo l'effetto cambia quando rilasci il pulsante e non quando lo premi...
Michele
__________________ __________________________________________________ The worst day flying is better than the best day working. |