Glad it worked.
There is another approach to using SUSPEND, RESUME and RESTART, and that is to have the tasks just loop until some status flag is set, in this case when 'b0' is non-zero the tasks do their thing then idly loop when 'b0' is zero again.
Code:
#Picaxe 14m2
symbol PIR = pinc.3
symbol strobe1 = B.1
symbol strobe2 = B.2
symbol strobe3 = B.3
symbol strobe4 = B.4
pause 45000 'time for the PIR to settle
main:
if PIR=0 then main
[b]b0 = 1[/b]
Pause 30000
[b]b0 = 0[/b]
goto main
start1:
do
[b]do : loop while b0 = 0[/b]
high strobe1 : pause 25
low strobe1 : pause 65
loop
start2:
do
do : loop while b0 = 0
high strobe2 : pause 30
low strobe2 : pause 55
loop
start3:
do
do : loop while b0 = 0
high strobe3 : pause 25
low strobe3 : pause 60
loop
start4:
do
do : loop while b0 = 0
high strobe4 : pause 30
low strobe4 : pause 50
loop
This isn't quite so efficient as the fist version so I would stick with that as it works, but this 'using a flag' trick can be useful in some cases as one only needs to control the flags, rather than use any SUSPEND, RESUME and RESTART. It uses less memory and isn't quite so complicated.