trying to use "or"
I have 3 sensors and dont want them to get "stuck" in a repeat loop if the trigger has moved into the zone of another sensor. i want the code to say ...repeat until motion is sensed in zone 2 or zone 3 (if its currently in zone 1) so its position is updated. I think im not using the correct "or" operator. Ive tried |,or,^.Any help would be appreciated.-mike
if ina[1]==1
repeat until ina[2]==1 or ina[3]==1
outa[pin]~~
if ina[1]==1
repeat until ina[2]==1 or ina[3]==1
outa[pin]~~

Comments
VAR long stack[32] PUB null dira[1..3]~~ dira[16..23]~~ cognew(buttons, @stack{0}) repeat if ina[1] !outa[16] ' in zone 1 repeat until ina[2][COLOR="#D3D3D3"]{== 1}[/COLOR]or ina[3][COLOR="#D3D3D3"]{== 1}[/COLOR] !outa[17] ' waiting waitcnt(clkfreq/4 + cnt) !outa[23] ' event in 2/3 PRI buttons dira[1..3]~~ waitcnt(clkfreq + cnt) outa[1] := 1 ' zone 1 event waitcnt(clkfreq*5 + cnt) outa[2] := 1 ' zone 2 event waitpne(0, 0, 0) ' keep "buttons" alive