|
|
Originariamente inviata da ciberman
|
X Toshiro
Io ho seguito come sai il vecchio post, ma il software, scusami forse sono cecato....ma non lo ho visto.. ti dispiace riallegarlo a questo di post??
|
ciao ciber ci si ritrova
'oscillatore per pilota luce acquario
main: low 2
low 0
let w0=1200
let b7=0
pause 3000
init2: low 0
gosub leggi_w4
if pin3=1 and w0>0 then inc
if pin3=1 and w0=0 then standby
if pin3=0 and w0=0 then dec
if pin3=0 and w0>0 and b7=1 then dec
goto init2
inc: let b7=1
high 2
pause 2000
inc0: let b7=1
for b3=0 to b4
pulsout 1,w0
if pin3=0 then init2
next b3
w0=w0-1
if w0=5 then standby
goto inc0
spegni: pause 2000
low 2
goto init2
dec: let b7=0
for b3=0 to b4
pulsout 1,w0
if pin3=1 then init2
next b3
w0=w0+1
if w0=1200 then spegni
goto dec
standby: pulsout 1,w0
high 0
if pin3=0 then dec
goto standby
ret: return
leggi_w4: readadc 4,b4
return