hi;
this is a program which is written at the page of the ultra sonic sensor:
[code]left_dist var word
right_dist var word
left var byte
right var byte
x var bit
y var byte
ECHO1 con 0
ECHO2 con 0
INIT1 con 4
INIT2 con 5
left_stop con 176
right_stop con 168
left = left_stop
right = right_stop
start:
if x=1 then skip1
x=1
pulsout INIT1,5
pulsin ECHO1,1,left_dist
left_dist=left_dist/74
’ pause 10
goto skip2
skip1:
x=0
pulsout INIT2,5
pulsin ECHO2,1,right_dist
right_dist=right_dist/74
’ pause 10
skip2:
if left_dist < 12 and right_dist < 12 then backup
if left_dist < 12 then turn_right
if right_dist < 12 then turn_left
forward:
left = left + 1 max left_stop + 20
right = right + 1 max right_stop + 20
for y=1 to 15
pulsout 2, (left * 5)
pulsout 3, (right * 5)
pause 30
next
goto start
turn_left:
left = left - 1 min left_stop - 20
'right = right + 1 max right_stop + 20
for y=1 to 5
pulsout 2, (left * 5)
pulsout 3, (right * 5)
pause 30
next
goto start
turn_right:
'left = left + 1 max left_stop + 20
right = right - 1 min right_stop - 20
for y=1 to 5
pulsout 2, (left * 5)
pulsout 3, (right * 5)
pause 30
next
goto start
backup:
for y=1 to 15
left = left - 1 min left_stop - 20
right = right - 1 min right_stop - 20
pulsout 2, (left * 5)
pulsout 3, (right * 5)
pause 20
next
left=left_stop
right=right_stop
for y=1 to 15
left = left - 1 min left_stop - 20
right = right + 1 max right_stop + 20
pulsout 2, (left * 5)
pulsout 3, (right * 5)
pause 20
next
goto start[/code]
but i dont know the connection that is compatible with this program so can you show how to connect the ultra sonic sensors with the bot board II and the arrangement of t he pins a s shown in the program and the jumper position…also can you clarify what is meant by (echo1 con 0 )…