Welcome to Synthiam!

The easiest way to program the most powerful robots. Use technologies by leading industry experts. ARC is a free-to-use robot programming software that makes servo automation, computer vision, autonomous navigation, and artificial intelligence easy.

Get Started
United Kingdom
Asked — Edited

Auto Connect Script

I couldn't see one in the EZ-Script section so here is the one I just wrote.

This will check all 5 connections, if any are not connected it will attempt to connect to all. Looping around to constantly check. I have not tested this to see how much resources the loop uses so all comments are appreciated.

To change from all 5 boards to just 1 board or a couple of boards is pretty straight forward, just edit the IF statement and the ControlCommand statement.


# Auto Connect/Reconnect Script
# Version: 1.0

# Check if EZBs are connected
IF (IsConnected(0) = FALSE or IsConnected(1) = FALSE or IsConnected(2) = FALSE or IsConnected(3) = FALSE or IsConnected(4) = FALSE)
# Visual output
PRINT("Connection Error: Attempting Reconnection")
# If any are not connected attempt to connect all
ControlCommand("Connection", ConnectAll)
# End of if statement
# Return to the start


Upgrade to ARC Pro

Your robot can be more than a simple automated machine with the power of ARC Pro!

Thanks RichMr2. This will come in handy. I have noticed that at times I'll loose a connection to one of my boards for what ever reason. This will keep them connected!
When using the auto connect script with an init script, if one of the ezb board gets disconnected and the the auto connect script reconnects the ezb will it also rerun the init script?

Ps, I do have this script in the connect of ever ezb board I'm using.

No @merne. This only connects the EZB's It will not start any other script.

The only reason your ESB's connect when you start ARC (from a shortcut created by ARC) is because that shortcut will start ARC and the INI script. That INI script then connects the EZB's (if you have the connect commands listed).

Hope this is clear. :)
If you have a script that you want to run when an EZB board gets connected, or reconnected, put that script in the Connection Control

User-inserted image

User-inserted image