Hello,
Imagine that I have a light sensor connected to a 08M2 and change the state of a pin dependent of the condicional of b0 defined by the sensor.
main:
readadc C.1,b0
debug b0
pause 500
if b0 > 20 then sub1 ; if b0 > 120 then do sub1
low B.2 ; else switch on 2
goto main
sub1:
high B.2
goto main
How can I make that if b0 > 20 for more than 5 seconds, then execute sub1????
Thank you in advance guys!!
Imagine that I have a light sensor connected to a 08M2 and change the state of a pin dependent of the condicional of b0 defined by the sensor.
main:
readadc C.1,b0
debug b0
pause 500
if b0 > 20 then sub1 ; if b0 > 120 then do sub1
low B.2 ; else switch on 2
goto main
sub1:
high B.2
goto main
How can I make that if b0 > 20 for more than 5 seconds, then execute sub1????
Thank you in advance guys!!