hi
I am picking up the two edge position with 2 light sensor. both the edges are in same line.
The problem:
for picking up the two points I am writing in two search moves. Is it possible to make it one search move?????? i have wrote the code below. Thank you.
Code
INTERRUPT DECL 31 WHEN $IN[14]==false DO firstpoint ()
INTERRUPT DECL 32 WHEN $IN[15]==false DO secondpoint ()
interrupt on 31
searchmovey1()
$advance=3
interrupt off 31
interrupt on 32
searchmovey2()
$advance=3
interrupt off 32
searchmovey1()
LIN P50
LIN P60
$advance=0
End
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
searchmovey2()
LIN P70
LIN P80
$advance=0
End
def firstpoint()
interrupt off 31
brake
DUMMY1=$POS_INT
WAIT SEC 0
RESUME
end
def secondpoint()
interrupt off 32
brake
WAIT SEC 0
DUMMY2=$POS_INT
resume
end
Display More