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

Auto Boot And Connect To Ezb

I have a fortune teller I built a couple of years ago, powered by an EZB. The computer which operates it is mounted in the cabinet. This allow security as it sits in a barn open to the public.

To turn the fortune teller on, we have to open the cabinet, start the computer, go to EZ builder, make the connection, etc. then lock it up again. Few know how to navigate the startup steps required in the EZ Builder software to get it running.

My question: is there a way an automatic start file can be made, so when the computer is turned on everything can be loaded and the program starts?

I already have the EZB, start a run script when it connects. which starts the builder program.

I have no clue if or how this can be done. Any ideas? I am sure others, have robots, which would like a feature allowing it to be turn on with a switch, and the robot could "self start".

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  
This takes a few steps, but is not too hard.

1) First, you need a connection script in your project that will automatically connect to the EZ-B when ARC is started.

Code:


if (isconnected(0) = 0)
controlcommand("connection", connect0)
else
endif


This will do it, but you might want to put it in a loop so it runs every 30 seconds or minute in case the EZ-B isn't powered up when it runs, or to reconnect if you loose connection. Change the "0"s to the EZ-B board number if you have more than one in the project. If you do add a loop, and intentionally want to disconnect from the EZ-B, stop the script before disconnecting.

2) Use the Shortcut Creator in ARC (on the options tab) to create a shortcut to your ARC project, and select your connection script to run at startup. Put the shortcut on your desktop for now.

3) Copy/move your link to your startup folder. In Windows 7, this was easy. It was a folder in your start menu. In windows 8 and above it is a little more complex. See https://scottiestech.info/2015/10/23/where-is-the-startup-folder-in-windows-10/ for instructions.

Alan
#2  
Alan's spot on. However, it's been my experience that if I run a script telling ARC to connect to a ezb after a connection has been established that the ezb will disconnect. If you run a connection loop you may have your ezb cycling the connection on and off. I'm not sure anymore but I think there's a command that will check your connection and reconnect if it finds it disconnected.
#3  
@Dave. Look at my script. It checks to see if there is a connection, and only issues the connection command if there is not a connection.

This works fine in a loop, and I have used it in one before, just don't have it in a current project because it does interfere when I am doing development and stopping my connection on purpose.

Alan
#4  
Hi Alan,
I will give it a try.

Thanks,
#5  
Excellent. I should have looked at your script closer. My apologies for any confusion.

Thanks for the script. I've been wanting to put this exact thing in my project. :)
#6  
@Alan... Not to be picky or anything, but you can take out the "else" in your above script...

Code:


if (isconnected(0) = 0)
controlcommand("connection", connect0)
endif
#7  

Quote:


Not to be picky or anything, but you can take out the "else" in your above script...


Yeah... This script has seen some edits in the project I copied it from. There used to be an else condition which has since been deleted.

Alan
#8  
Works fine,except I am using two WiFi dongles. I need a something to connect the ezb to the computer using the right dongle. Is it possible? Can something be built in the startup folder?
#9  
hmm...it doesn't auto-reconnect when the EZ-B (or the computer) powers up?

What is the architecture? Are you using one dongle for internet (or home network through a router) and hte other for EZ-B's network? If that is the case, I would put the EZ-B in client mode, and in your router, assign it a static IP so it is always the same IP n the project.

Alan
#10  
Tomorrow I will pull the network dongle so there is only the one for the EZb and see if it connects. I only need the EZB. I don't need the network.
#11  
It is working great ! I changed out the dongle and it works fine. It connects and runs perfect with the computer booting from scratch. All that is left is I need to re-do the switch on the EZB and it will be done. I can still connect to the network too.

Alan, thanks for the help !
#13  
Hi @the tech guru & @Richard_R

Thanks for the autoconnect script.

It works great if I choose to manually disconnect from ARC.

However, with that script looping if I turn off the power on the EZB robot, ARC thinks the robot is still connected and when the robot is turned back on the script will not reconnect the robot!

A way to demo the issue is use the script on a blank program, connect to the EZB and then turn off the robot. Note that the Connection Control will still indicate the robot is connected (isconnected(0) =TRUE) and the script will not reconnect

After running some tests, I found that the way to make it work in this situation is to add an additional script that tries to exercise the connection so that ARC will declare the connect disconnected.

Code:


:loop
if (isconnected(0) = FALSE)
ControlCommand("Connection", Connect0)
Print("reconnecting")
else
print("...")
endif

ControlCommand("WatchDog", ScriptStart) # exercise connection
Sleep( 5000 )
goto(loop)


and here is the Watchdog script to exercise the connection.
This code can't be in the looping script as it will crash when no connection is found

Code:


# cause an activity to take place on EZB
servo(d0,GetServo(d0))


Regards,
Frank
#14  
Coolest, kinda like in olden days when we had to send a ping to keep a connection open. :)
#15  
Hi Dave,
What I especially like about this approach is that I can keep a low cost Windows tablet (NuVision) running ARC with a program on it for a robot and turn on that robot and have ARC automatically connect to it!

Its almost like having the program resident in the EZB on the robot...:)

Just turn on the robot and it starts operating

Regards,
Frank