Hello,
I have built this program : when a 5v going on A.0, then the program turn on a led connected on the A.1 pin then turn off it. after a delay the program turn on the led...
Can anybody say me if my program is good ?
Thanks a lot
Device 16C84
Dim Entree,Attente,Tempo
Symbol entree = A.0
Debut: if entree=1 then outa(1)
Attente=10
outa(0)
Gosub Tempo
outa(1)
Attente=20
a.1=0
Gosub Tempo
outa(1)
Attente=30000
a.1=0
Gosub Tempo
outa(1)
Attente=4000
a.1=0
Gosub Tempo
outa(1)
Attente=10
a.1=0
GoTo Debut
TEMPO:
for _Tempo = 1 to attente
then delayms(100)
next _Tempo
return
end
I have built this program : when a 5v going on A.0, then the program turn on a led connected on the A.1 pin then turn off it. after a delay the program turn on the led...
Can anybody say me if my program is good ?
Thanks a lot
Device 16C84
Dim Entree,Attente,Tempo
Symbol entree = A.0
Debut: if entree=1 then outa(1)
Attente=10
outa(0)
Gosub Tempo
outa(1)
Attente=20
a.1=0
Gosub Tempo
outa(1)
Attente=30000
a.1=0
Gosub Tempo
outa(1)
Attente=4000
a.1=0
Gosub Tempo
outa(1)
Attente=10
a.1=0
GoTo Debut
TEMPO:
for _Tempo = 1 to attente
then delayms(100)
next _Tempo
return
end