What I want the robot to do is move forward 3 seconds as long as nothing is detected in its path using adc5 or adc6, ir sensors. Sensors work fine. Have tried several iterations of scripting. No matter what I try the sensors do see above 60 but the robot never stops. Posting my scripts.
Check distance script with forward movement
$leftsensor = getadc(adc5)
$topsensor = getadc(adc7)
$rightsensor = getadc(adc6)
if ($leftsensor 60)or ($rightsensor >60)
ControlCommand("Script Manager ", ScriptStart, "Emergency_Stop")
In this particular instance I called my emergency stop script which follows...
ControlCommand("Script Manager ", ScriptStopAll)
Again robot continues to go forward without stopping. Thanks guys!