Asked — Edited
Resolved Resolved by DJ Sures!

Exiting A Classic Control Loop In A Script Via Voice Command?

Below is a simple code I hacked up to use with the voice recognition control... It works as expected... I am controlling the robot via voice mostly, but sometimes i want it to roam autonomously (as per my simple code below). However, problem is I can't figure out how to exit the script at will... Once this script starts it only stops when the ping detects an object... Ideally, I would like to take back control of the robot at any time... So my question is, how do I break out of the control loop using a voice command or any other way for that matter? By the way, the script has no name because it is within the voice command control...

Say("Forward slowly") SendSerial(D0, 38400, 161) SendSerial(D0, 38400, 93) :loop $fping=getping(D7,D7) #using a SRF05 sonar with echo and trigger on the same pin if($fping<15) say("Object close by, stopping") SendSerial(D0, 38400, 0) SendSerial(D0, 38400, 0) Halt() endif goto(loop)


ARC Pro

Upgrade to ARC Pro

Experience early access to the latest features and updates. You'll have everything that is needed to unleash your robot's potential.

United Kingdom
#9  

I just saw that, now that's what I call awesome customer relations!:D

#10  

Geez Dude!... are you sure you're not a robot yourself... how on earth did you put that control feature into ARC in what was basically a blink of an eye... I'll try it right now... Just means DJ is going to get more of my freekin' money....:D Thanks DJ and Rich