S.o.s lap counter help

RodrigoFramrose

New Member
Hello good afternoon.
I need a little help, I need to do a lap counter that works with opto-electronic sensor and I need help to make the code because I've tried several times and I can't achieve my goal.
any suggestion is welcome
 

BESQUEUT

Senior Member
Hello good afternoon.
I need a little help, I need to do a lap counter that works with opto-electronic sensor and I need help to make the code because I've tried several times and I can't achieve my goal.
any suggestion is welcome
Welcome.
Please, publish your code...
 

RodrigoFramrose

New Member
Welcome.
Please, publish your code...
Symbol Led = B.4
Symbol Contador = b0
symbol contagem = b2
Symbol Led2 = pinC.2 ;Contador de agua
;Symbol Carregarxlts = B.0
;Symbol Descarregarxlts = B.1



main:
b1 = 3 ;valor ficticio
call Descarregarxlts
call Carregarxlts
; for contador = 1 to contagem
; high Led
; pause 50
; low Led
; pause 50
; do
; loop while led2=1
; next Contador
; if B.0 = 1 then
; goto Carregarxlts
; else
; call Carregarxlts
; for contador = 1 to contagem
; high Led
; pause 50
; low Led
; pause 50
; do
; loop while led2=1
; next Contador
goto main
end

Descarregarxlts:

contagem = 5 * b1

for contador = 1 to contagem
high Led
do
loop while led2 = 1
next contador

low Led

return

Carregarxlts:

contagem = 8 * b1


for contador = 1 to contagem
high Led
do
loop while led2 = 1
next Contador

low Led
return
end
 

BESQUEUT

Senior Member
It seems that LED is a reserved word !

Try replacing LED everywhere with Led1.
 
Last edited:
Top