Which is better coding and or lower load on the picaxe to create a timing loop. A for/next or do/loop (both a similar bytes).
Another appraoch could be a long pause with polled interrupt, but I was more interested in the for/next do/loop question
'for/next
for w0 = 1 to 6000 'combined with pause makes 10 min run time
pulsout 2, 10000 ' flash a led during running
pause 1000
if pin1 = 1 then pump_off ' if push switch is pressed again
next w0
goto main
OR
'do/loop
do
inc w0
pulsout 3, 10000 ' flash a led during running
pause 1000
if pin1 = 1 then pump_off ' if push switch is pressed again
loop until w0 = 6000 ' gives roughly 10 minute run
goto main
Another appraoch could be a long pause with polled interrupt, but I was more interested in the for/next do/loop question
'for/next
for w0 = 1 to 6000 'combined with pause makes 10 min run time
pulsout 2, 10000 ' flash a led during running
pause 1000
if pin1 = 1 then pump_off ' if push switch is pressed again
next w0
goto main
OR
'do/loop
do
inc w0
pulsout 3, 10000 ' flash a led during running
pause 1000
if pin1 = 1 then pump_off ' if push switch is pressed again
loop until w0 = 6000 ' gives roughly 10 minute run
goto main