Asked — Edited

What Does Undefined Function Call Mean?

NeverMind. I did something Stupid. I installed the new update on my master computer and then ran the program on the robot without the update. so, there wasn't the newly created function on the robot. Crazy.

eek


ARC Pro

Upgrade to ARC Pro

Get access to the latest features and updates before they're released. You'll have everything that's needed to unleash your robot's potential!

PRO
Synthiam
#1  

It will be easier if you provide a project file please

#2  

I got it fixed. I did not have the latest Update. Sorry.

But, I do have a question. When I am running the Roomba, I have the script checking for the objects and it is going forward. She will go forward until I say stop or there is an object in front. But I have it in a loop to continue testing for objects, and I use speech recognition windows to say stop the script. But when I stop the script, she doesn't stop, the Roomba continues to go forward. I have to then say Robot Stop. Is there a way to stop the robot when I stop the script?

thanks,

I am enjoying that subroutine.

The script actually did not work for me when I got it. I found out that my sharp sensors were flaky. So, I changed it to work with only the PING units and I guess it will be ok. But work or not, it was a GREAT tutorial. And, I am getting some of my confidence back.

PRO
Synthiam
#3  

Rather than use a ControlCommand() to stop the script, use a variable.

For example in the looping code, do something like this..



# This variable will be used to determine if we exit.
# If it is a 0, we continue running
# If it is a 1, we exit this script
$exit = 0

# begin moving forward
Forward()

:Start

# Get the ping sensor value
$ping1 = GetPing(d9, d8)

# If the ping sensor value is less than 20, alarm!
if ($ping1 < 20)
  goto(Alarm)

# If the exit value is 1, exit the script
if ($exit = 1)
  goto(Exit)

Sleep(500)

Goto(Start)

:Alarm
Stop()
Say("Object Detected")
Halt()

:Exit
Stop()
Say("Received Command Stop")
Halt()

And in your Exit Command for Speech REcognition, you will set $exit = 1

You start the script the same way you'd normally start, by ControlCommand("MyScript", ScriptStart)

#4  

thanks, D.J. -You are the Greatest!!!

Mel