Creating A Script For Irobot Create - iRobot CREATE Owner's Manual

Hide thumbs Also See for CREATE:
Table of Contents

Advertisement

Creating a Script for iRobot Create

iRobot Create's Open Interface (OI) supports a simple scripting language.
A script consists of a sequence of commands, including drive commands
and commands that wait for an event such as a button press, elapsed time,
or sensor trigger. These commands are documented in detail in the iRobot
Create Open Interface (OI) Specification. Scripts are stored in iRobot Create's
RAM, which is cleared when the robot loses power.
using the script Command
To load a script onto iRobot Create, use the Script command (152), followed by
the number of bytes in the script, followed by the series of commands and
their arguments. Scripts can be up to 100 bytes long.
example:
Drive in a square:
152 17 137 1 44 128 0 156 1 144 137 1 44 0 1 157 0 90 153
The meaning of the above string of numbers is:
Commands and Arguments
Script
Number of bytes
Drive
300 mm/s
Straight
Wait for Distance
400 mm
Drive
300 mm/s
Spinning counterclockwise
Wait for Angle
90 degrees
Restart Script
using the Play script Command
When you are ready for iRobot Create to perform the script, send the Play
Script command (153). This loads the script into the serial queue. iRobot
Create then immediately begins executing the script's commands as if they
had been sent directly to the serial port.
To download a copy of the iRobot Create Open Interface Specification, go to
www.irobot.com/create.
Values
152
17
137
1
44
128
0
156
1
144
137
1
44
0
1
157
0
90
153
www.irobot.com
®
1

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the CREATE and is the answer not in the manual?

Questions and answers

Table of Contents