Skip to content

Tutorial 2.4: Writing new programs

kaimihata edited this page Oct 21, 2020 · 4 revisions

This page is still in progress..

Writing new programs (Level 2)

Viewing Robot Programs

Selecting a robot from the first robot selection dropdown will allow you to view and run, but not edit, the programs that have been saved to this robot. Clicking run will run the program from your computer. In another window/on another computer you can interact with the robot through the web robot. Programs stored on a robot are read only! To make changes and save a program, you must use a program that you created and is stored under "My Programs"!

Creating Robot Programs

The Robot Programming Tool runs programs by calling JavaScripts eval() function on any code you enter into the editor, so you can write an javascript code here. Clicking on "Show Robot Functions" will list the available functions, screens and faces on the selected robot. Clicking "Run" will run the program on the robot selected by the SECOND dropdown menu. It can be confusing if you have different robots selected from the two different dropdown menus. To get button input, copy the code to wait for button input, then you can use an if statement to determine the button name and navigate to the correct screen, set the face, etc.

Common Problems

If your program that you are running is awaiting a button, but you rerun the program while it's still waiting for user input, it might get messed up and give some unexpected results, so you may need to refresh the page in between running programs (make sure to save any changes before reloading). (This is an open issue)

Programming tool. Viewing existing programs on different robots (read only) and executing. Writing a new program, naming, description, testing. Copying programs to my programs and renaming/editing.

Viewing the robot API. (Have a link here to the page that shows the robot current API for different robots).

<< Go back to the list of tutorials

Clone this wiki locally