I use the code below on a Picaxe 14M2 to count seconds between switch closures. Time can vary fron 1 to 22 seconds.
Will loop around keeponw until pinc.2 goes true.
Can this be done on the Picaxe 20X2 and if so how?
Thanks
Al
Will loop around keeponw until pinc.2 goes true.
Can this be done on the Picaxe 20X2 and if so how?
Thanks
Al
Code:
Start:
setfreq m4
pulsout b.3,10 ;reset
if pinc.1 = 1 then east
if pinc.2 = 0 then start
time = 0
let b0 = time
keeponw:
if pinc.1 = 0 then keeponw
let b1 = time
b1 = b1 - b0
readtable b1,b4
goto calc