Welcome to Synthiam!

Program robots using technologies created from industry experts. ARC is our free-to-use robot programming software that makes features like vision recognition, navigation and artificial intelligence easy.

Get Started
Asked — Edited
Resolved Resolved by Rich!

Making Script Command Run If Connection To Ez-B Disconnects Or Low

If my robot's detection is ever lost do to distance and it is in a harmful environment (H2S) that I can't go into, isn't the robot "technically" trapped.

I know that you can run script that can automatically connect to the EZ-B. But can you run script that does almost the opposite and detects when connection is lost. Meaning that if my rover 5 lost connection and now is to far for me to reconnect, can you setup a way that when disconnected it runs a script command and drives closer to you then is disconnected, etc. (I know to run the EZ-B it needs a computer so it seems non-doable, but is there a similar way like this:

Ex: could the signal when becoming low be used as a variable and just before reaching 0 it stops and warns you that you will lose connection if you drive in that direction anymore.

I am planning to use an XBee which will have a good distance, but I want to be careful b/c loosing my robot after hours of work would really suck and the only way out would be building a new one with more range that would be capable of pulling it back.

AI Support Bot
Related Content
Synthiam
Based on your post activity, we found some content that may be interesting to you. Explore these other tutorials and community conversations.
#1  
There may be a fail safe program that could execute from a minicomputer that would be on board your robot and only run if the comm link was down. The unknown points are what will you tell the robot to do.
#2  
That would most likely work, but I don't think I have the room for it in my robot, and the ones that would fit and can run windows usually cost at least $250-350. Your idea is great I will definitely remember that for future projects involving this same topic (would make more room for an on board minicomputer), but if I could somehow take in info on the signal strength and manage to stop it, I think it would be cheaper and take up less room (possibly no money and no room taken).

Is there a way to detect signal strength?
United Kingdom
#3  
Once disconnected you can't control the robot, so if you do get disconnected no script will be of any use.

You could build a circuit to emit an audible beep and visual light on disconnect, search for the word Watchdog. But other than that you are going to need to be connected to have ARC control anything.

What you would need is for the EZ-B to be connected to an onboard PC to minimise disconnection risk - ideally change the bt module for a USB module. You can then remotely control that PC through the Server option and use a second PC running ARC too, this is capable of doing everything the onboard can. You can then use something to detect a disconnection between the 2 PCs and run a script to escape or return back to you. You would need something that pings the remote PC regularly and on failure sends a trigger to ARC - this can be done via telnet between applications running on the same PC.

Basically, the onboard PC is just a host for the EZ-B and has the return/escape script waiting to run on it. A looping script waiting for change on a variable i.e. $remotepc and if it does then the script runs and the robot escapes. You can easily use telnet to change a variable, simple python should be able to do it, something like;

Code:


from socket import *
import time
HOST = '192.168.0.2'
PORT = 6666
ADDR = (HOST,PORT)
BUFSIZE = 4096
cli = socket( AF_INET,SOCK_STREAM)
cli.connect ((ADDR))
data = cli.recv(BUFSIZE)
cli.send('$remotepc = 0')
cli.close


It's not perfect, it's to give an idea only, it may work (it should work) but double check it. Basically, have something such as eventghost run that python script if a ping to the remote PC fails. That will set the variable to 0 and the script will pick up on that causing it to run and the robot escape. All of which can be done using EventGhost.

As far as I know there is no way to read the signal strength.
Canada
#4  
For FPV (First Person View) flight in the R/C world they have an onscreen signal
strength readout. As your flying if the signal is getting too weak you can turn
back towards yourself for a stronger signal.

I wonder if we can get these 2 variables in to ARC?

BTrxSignal
BTtxSignal

We could build scripts to keep our little robot drone colonies within range.

I have no idea if this is possible but it is always nice to dream!
United Kingdom
#5  
@DJ is the man to answer that one. Adding the info to a HUD is simple (see Jarvis, he has battery, current and ping details on his hud) but getting the signal info will ultimately be down to DJ and the software:)
#6  
@Lumpy ...Great idea! In addition to the Watchdog timer circuit, a BTrx/tx signal variable would be awesome! Perhaps DJ might think about that and add it to the in-pile:) or suggest another circuit add on monitored by the ADC.
#8  
This is a great idea, exactly what I was thinking. Which this way of thinking has brought me to an idea that I can use since I am using an XBee. The program X-CTU for XBee it's self has a signal range tester. This will work I just won't be able to bring this data into ez-b:( and I'll have to switch between the 2 programs:( but it will keep my robot from losing detection as long as I watch it enough:)

I really hope DJ Sures will add the features mentioned above, it is a great idea and will help solve a lot of problems, I also think the code for it wouldn't take to long so making it would be a win-win.

I would recommend someone giving this idea to dj if he hasn't already seen it.

Thanks for clarifying how to do this I just hope I see more of this in the future, if anyone. An add to this idea or other methods i will always appreciate, hopefully I will see this in the near future.
#9  
thanks again tired of getting messages so i am closing this thread