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.

This skill gives you a console directly to the EZ-Script engine. You can execute commands in real-time. A history of your commands is saved and can be recalled using the UP and DOWN arrow keys. Main...


Adds a new ez-script function GetLineContainingFromArray() that will return an item from the array that contains the specified text.


This skill allows you to use movement actions to control additional scripts. For example, all "Movements" are global. So if you use a Movement Panel of any kind, this skill will execute the script...


This skill will execute a script when a variable has changed.


This control uses a random-like algorithm to add a unique personality to your robot. By adding script commands to the Config section, the commands will be executed within the specified High/Low...


This skill is a mimic tool. You perform specific actions while the skill records communication between the EZB and your PC (movement, servo positions, digital set, etc.). It then allows you to play...


The script skill is very versatile; it can interact with most ARC skills. It is also very intuitive, as it contains multiple detailed manuals for assistance with programming in its settings menu. The...


This control holds many scripts. Rather than having one control per script, this contains many. Like the regular Script control, you can execute scripts within the Script Manager using the...


This is a diagnosing tool to identify scripts that are running. Many skills have script events that are triggered based on activity. For example, a Wii Skill will execute a script when a button is...


Bind a script to servo position movements.


There are so many ways to present visual feedback with this skill. The Sketch Pad allows you to draw with controlCommand() from a script. You can create scripts that draw object locations in a room or...


This skill operates similarly to the Servo Slide controls but adjusts the specified variable with a slider. You can also specify a script to execute when the slider value has been reached. Main...


This is a smarter variable watcher that replaces the standard built-in version. This version uses less CPU for large projects.


This feature is currently under development and does not actually work. :) But it will soon!


Split complex tasks into several simple scripts. Each script is a stage of completing a task.


Example of how to create a plugin that becomes an ez-script function.


Save and Restore variable data to a file.


This skill views the known script variables and their respective values. Variable Watch automatically refreshes to show variable values. This is a great skill for debugging your programs and viewing...