Asked

Auto-Start Script On Iotiny

, is there a way to have a script on the IoTiny start automatically as soon as it's powered on ? i have a prototype of a small robotic arm, one camera, 2 servos connected to an iotiny, works fine. The idea is, the arm should move as soon as the iotiny is powered on. As far as i understand a project must be loaded and then a script will be executed.  Thinking


Related Hardware EZ-B IoTiny
Related Control Shortcut Creator

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.

PRO
Canada
#1  

Below is some guidance on how to set your robotic arm (via IoTiny) moving at startup:

  1. Currently the IoTiny’s firmware is designed to work as a peripheral controlled by ARC. That means a project must be loaded (with ARC running) before any scripts run. There isn’t a builtin standalone autostart script that executes as soon as the IoTiny gets power.

  2. To achieve the behavior you’re after (moving the arm on powerup), you can setup your ARC project with an "On Startup" or "Init" script. When the IoTiny connects to ARC (or when ARC loads your project automatically), the script can begin executing and move your arm immediately.

For example, in your ARC project you might do the following:

  • Open your project’s script editor.
  • Place your movearm commands (using ControlCommand() or direct servo commands) in the "Init" script.

Here’s a simplified JavaScript example:

print("Initialization started");
  
// Example: set servos on port D1 and D2 to their start positions
Servo.setPosition(D1, 90);
Servo.setPosition(D2, 45);
  
print("Arm is moving as part of Auto-Start Script");
  1. If you want your IoTiny to power on and selfstart without manual intervention, you’ll need to have your computer (or embedded device) autolaunch ARC with your project. This might be via a shortcut or startup script on your PC. Once ARC is running and the project is loaded, your initialization script will run automatically.

  2. For a truly autonomous behavior (without ARC) you would have to modify the firmware or use a different controller that supports storing and executing scripts natively on boot. That approach isn’t available with the current IoTiny firmware.

In summary, while the IoTiny does not support running a script by itself immediately on powerup, you can accomplish the desired behavior by autoloading your ARC project and placing your movearm script in the project’s initialization or On Startup script so that it fires as soon as ARC is connected.

If you have further questions or need additional details about setting up ARC projects with your IoTiny, feel free to ask!


I am a customer support GPT-powered AI and still learning. If you have doubts about my response, please use the support documentation to verify my answer.
PRO
Germany
#2  

You wrote: you’ll need to have your computer (or embedded device) autolaunch ARC with your project. This might be via a shortcut or startup script on your PC. Once ARC is running and the project is loaded, your initialization script will run automatically.  I understand the startup script on the PC will launch ARC but how do you load a project and connect to the iotiny from the startup script ?

PRO
Canada
#3  

Below is some guidance on how you can have your PC auto-launch ARC, load your project, and then the project will set up the IoTiny connection automatically via its stored settings.


1. Auto-Launching ARC and Loading a Project

ARC supports launching with a specific project loaded using a command-line argument. In other words, you can add a shortcut or a startup script that calls the ARC executable with your project file as a parameter. For example, if your ARC executable is installed in:

C:\Program Files\Synthiam\ARC\ARC.exe

and your project file is stored as:

C:\Projects\MyRobot.arcproj

then your startup command might look like:

"C:\Program Files\Synthiam\ARC\ARC.exe" "C:\Projects\MyRobot.arcproj"

By using this shortcut or adding a startup script (for example, a batch file on Windows) in your PC’s startup folder, ARC will start up and load the specified project automatically.


2. Auto-Connecting to the IoTiny

Once the project is loaded:

Your project settings save the connection details (such as the IP address for the IoTiny, if using Wi-Fi or another connection type).
If you have correctly configured the IoTiny connection in the ARC Connection robot skill, ARC will try to connect to the IoTiny automatically upon launch.

For example, in your project’s connection settings you should have already provided the IoTiny’s address. When the project starts, ARC will initiate the connection and once connected your On Startup (or Init) script will execute.


3. Putting It All Together

Here’s how you can set this up:

  1. Create a Startup Script or Shortcut
    - Create a batch file (e.g., AutoStartARC.bat) with the command:
    -------------------------------------------------
    "C:\Program Files\Synthiam\ARC\ARC.exe" "C:\Projects\MyRobot.arcproj"
    -------------------------------------------------
    - Place this batch file in your Windows Startup folder (or schedule it via Windows Task Scheduler) so that it runs when your PC boots.

  2. Verify Project Settings
    - Open your project file in ARC once manually and ensure that the Connection robot skill is correctly configured to connect to your IoTiny.
    - Verify that your Initialization or On Startup scripts include the commands you want to run (for example, moving the robotic arm immediately after the IoTiny is connected).

  3. Test the Setup
    - Reboot your PC (or log off and log in) to ensure that ARC launches, the project is automatically loaded, the IoTiny connection is made, and the startup script runs.


By properly setting up the command-line startup parameters and saving your connection settings within the project, you can have your system boot up ARC, load your project, and connect to your IoTiny without manual intervention.

Feel free to ask if you have any more questions or need further clarification on any of these steps!


I am a customer support GPT-powered AI and still learning. If you have doubts about my response, please use the support documentation to verify my answer.
PRO
Canada
#6  

Below is some additional information and resources that may help you set up your system as described:

  1. Shortcut Creator
    The built-in Shortcut Creator is quite useful for configuring ARC to automatically load a project. Please check out our documentation at:
    Shortcut Creator Documentation

  2. Loading a Project on Windows Startup
    We have a detailed guide on how to launch ARC with a project loaded via a Windows startup script or shortcut. This guide explains how to pass the project file as a parameter to ARC. You can find it here:
    Load Project on Windows Startup

  3. Headless System Setup
    If you are describing a headless setup (i.e. a system where ARC is running on a PC or SBC without a dedicated monitor), this document provides important tips on configuring your device correctly:
    Headless Robot SBC Configuration

Putting It All Together

  • For a typical Windows PC startup:
    Create a shortcut or a batch file that launches ARC with your project file. For example, your batch file may look like this:

    "C:\Program Files\Synthiam\ARC\ARC.exe" "C:\Projects\MyRobot.arcproj"
    

    Place this batch file in your Windows Startup folder (or schedule it via Task Scheduler). With the proper connection settings stored in your ARC project, ARC will automatically connect to your IoTiny and run your startup (Initialization) script.

  • For a headless setup:
    Follow the headless robot documentation to configure your PC (or SBC) to run ARC without a monitor. Many users have successfully set up fully autonomous systems that power on, load the project, and auto-connect to the IoTiny.

Feel free to ask if you have any questions or need further assistance setting up your system!


I am a customer support GPT-powered AI and still learning. If you have doubts about my response, please use the support documentation to verify my answer.