15. Programming Introduction

Synthiam has developed the ARC software to scale between beginner and advanced users. Our mission is to make robot programming accessible and increase the likelihood of success. Within the configuration dialog of nearly all skill controls is the ability to edit scripts to define specific programmatic behaviors, such as when to start tracking using the camera. The script editors are input fields with a pencil icon to the right. In this example, we are displaying the configuration dialog for the WiiMote.


Editor Dialog

The editor dialog consists of an input section on the left and reference assistance on the right. The window can be resized or maximized; remember the last size for future use.


Program in Multiple Languages

The programming language tab will be selected if there is existing code in the editor when it loads. Alternatively, if you are editing a blank script, there will not be any code, and you can select the tab for the programming language you wish to use. If there is existing code, changing the programming language will present a confirmation that you want to erase the current code and start over.


Introducing the Control Command

Programming in ARC is straightforward because you will leverage robot skills' functionality. Whichever programming language you choose below, most of your programming will link robot skills together using the ControlCommand.

You are familiar with Robot Skills by reaching this far in the Getting Started guide. There are plenty of windows within the ARC project desktop, and each window is a robot skill control. A robot skill control is a little program that runs within ARC created by one of our many partners. For example, hundreds of robot skill controls are available in the Robot Skill Store, such as gpt-3, vision detection (face, emotion, color, glyph, etc.), servo gait/animation, speech recognition, etc. Each robot skill control is a behavior that gives your robot more ability. These robot skill controls are separate programs that do something specific, such as processing video image data from the camera or moving servos in animations. Because each robot skill control is a particular program, ARC provides a mechanism for robot skills to talk to each other. This mechanism is called the ControlCommand().

Using control commands, an event of one robot skill can instruct another robot skill to do something. For example, if the Speech Recognition control detects the phrase "Follow My Face," the respective code may be instructed to inform the Camera control to enable Face Tracking.

Capture.PNG

This detailed example detects speech recognition text and uses cognitive services for more extensive messages. The manuals for each robot skill will be essential to review when creating projects.

For further reading about the ControlCommand and how it works, we recommend reading its dedicated manual page here.


Choose Programming Environment

We have provided access to various programming methods to accommodate all users. Once you are ready to begin programming a robot, select a programming skill level.


Roboscratch

(Very easy)

Designed for learning the basics of programming, RoboScratch introduces a programming interface exclusive to ARC. With RoboScratch, function blocks are added to the workspace to create a sketch. Some blocks include waiting for the camera to see an object, waiting for speech, or executing a movement action. Link blocks to instruct robots to perform behaviors and complete tasks.

Learn More

Blockly

(Easy)

Blockly programming provides the user with graphical blocks representing programming functions or subroutines. This allows users to access advanced technologies creatively without knowing the programming syntax by typing with a keyboard.

Learn More

Scripting

(Intermediate)

Syntax programming is available in three scripting languages JavaScript, EZ-Script, and Python. All robot skills support scripting languages interacting with each other for custom behaviors. Using the powerful ControlCommand messaging system, have events from robot skills send triggers to other robot skills within the project.

Javascript

EZ-Script

Python

Programming

(Advanced)

Compile programs and libraries which interface with the ARC API. Make robot skills to distribute in the robot skill store or use the existing framework to accelerate robot development. Access existing robot skills or the ARC API framework with C++, C, C#, VB, and more.

Learn More


Scripting Robot Skills

Nearly all robot skills have the option to execute a script. However, there are robot skills specific to scripting. These scripting robot skills allow you to run programs or customize features, such as creating a custom movement panel.

Real-time EZ-Script console for ARC: enter and execute single-line commands, view output, clear display, and recall history with UP/DOWN.


Adds GetLineContainingFromArray() ez-script function to return the first array item that contains specified text, simplifying substring searches.


Trigger direction-specific scripts when ARC movement panels change; assign scripts per direction/stop, access direction and speed (JS/Python/EZ).


Run scripts automatically when specified ARC variables change; define variable-to-script pairs, monitor status, and trigger actions.


Background randomizer that executes timed scripts to add lifelike actions (movement, servos, camera/control) and unique personality to your robot


Record and replay EZB communications (servo & digital commands) with forward/reverse playback, save recordings and trigger them from scripts


Multi-language ARC Script: build, run and debug Blockly, JavaScript, EZ-Script or Python with Intellisense, run/save/load and Roboscratch support


Run JavaScript or Python scripts to automate processes and control other ARC robot skills.


Manage and execute multiple scripts in a single Script Manager using ControlCommand(), with Control Details showing available commands.


Monitor and diagnose running ARC scripts: view active script labels, statuses, and stop long-running or background scripts easily.


Bind scripts to servo moves (V1-V99); triggers on position/speed/accel changes and provides ports, positions and speeds arrays for custom control.


Script-driven Sketch Pad for ARC: draw shapes, text, lines and faces via controlCommand() to visualize object locations, paths and robot data.


Adjust a numeric variable via slider (0-1000) with customizable min/max, center button and scripts triggered on value change or bonus button press.


Efficient ARC Variable Watcher - lower CPU for large projects; slow initial array render but faster updates; shows name, type, value, length


Replaced by Sound Script (Speech Script) robot skill; see Synthiam's Speech Script support page.


Split complex robot tasks into sequential scripts, synchronizing asynchronous skills via NEXT/CANCEL commands for staged automation.


Add custom EZ-Script functions in C# or JS; intercept unknown calls, parse parameters and return values via AdditionalFunctionEvent.


Persist and auto-load specified global variables between ARC sessions for consistent, personalized robot behavior and quick state restoration.


Live view of script variables, types, sizes and values for debugging; auto-refresh, hex view, pause/clear; may affect program performance.