background image

www.irobot.com

1

 

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: 

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

Commands and Arguments

Values

Script

152

Number of bytes

17

Drive              

137

300 mm/s

1             44

Straight

128         0

Wait for Distance

156

400 mm

1             144

Drive

137

300 mm/s

1             44

Spinning counterclockwise

0             1

Wait for Angle

157

90 degrees

0             90

Restart Script

153

Содержание CREATE

Страница 1: ...iRobot Create Owner s guide www irobot com SAVE 15 on accessories See back for details...

Страница 2: ...Create to pick up anything that is burning or smoking Always remove the battery before long term storage or transportation iRobot Create has built in safety sensors to keep it from falling down stairs...

Страница 3: ...rface Commands 11 Sending OI Commands from a PC 11 Sending OI Commands from a Microprocessor 12 Creating a Script for iRobot Create 13 Accessories Available for iRobot Create 14 Virtual Wall 14 Self C...

Страница 4: ...ideas As you become more comfortable with its abilities and interface you will want to write your own Open Interface based programs to control iRobot Create using a serial connection from a PC or micr...

Страница 5: ...harging Socket Serial Port Handle Cliff Sensor Openings Contact Points for Home Base Battery Bottom View Cargo Bay Connector 6 32 Mounting Cavities Buttons and Lights Power LED Power Button Play Butto...

Страница 6: ...nts the back of the robot from dragging when you add payloads The fourth wheel is not necessary unless iRobot Create is running with a payload Figure 1 iRobot Create s fourth wheel To attach the fourt...

Страница 7: ...to follow around the edges of a room using its wall sensor and bumper 4 Figure Eight iRobot Create continuously drives in a figure 8 pattern 5 _ Wimp iRobot Create drives forward when pushed from beh...

Страница 8: ...ries It is green when the batteries are fully charged or new and gradually turns red as the batteries discharge Color of Power Light Battery Status Slow Pulsing Orange Charging iRobot rechargeable bat...

Страница 9: ...he robot is constantly moving If you plan to have your robot moving continuously iRobot recommends that you purchase a rechargeable battery pack at www irobot com Using the Alkaline Battery Pack Use a...

Страница 10: ...from iRobot Create 8 Switched 5V Provides a regulated 5V 100 mA supply and analog reference voltage when iRobot Create is switched on 9 Vpwr iRobot Create battery voltage unregulated 0 5A 10 Switched...

Страница 11: ...on to a PC The serial cable plugs into iRobot Create s Mini Din connector which is located in the rear right side of iRobot Create beneath a snap away plastic guard Sending OI Commands from a PC Conne...

Страница 12: ...plex behaviors you can write software that runs on the PC and sends commands to the robot while reading its sensor data Your software can communicate with iRobot Create over the included serial cable...

Страница 13: ...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 Using...

Страница 14: ...6 for information on how to select and start iRobot Create s built in demos The Home demo requires one Virtual Wall To enable the Home demo cover the back and sides of the Omnidirectional IR receiver...

Страница 15: ...at www irobot com Roomba Standard Remote The Roomba Standard Remote lets you control iRobot Create from a distance With the Remote you can select and start a built in demo as well as directly drive th...

Страница 16: ...not have a Roomba battery you can purchase one of these optional rechargeable battery packs iRobot Create Rechargeable Battery kit This kit comes with a standard rechargeable battery and a standard ch...

Страница 17: ...obstruction or robot attempting to drive over an obstacle Turn over iRobot Create and remove any obstructions that prevent the wheels from seating all the way up into iRobot Create s body Also remove...

Страница 18: ...gure Eight 7 Home 7 Mouse 7 Spot Cover 7 Tag 7 Wimp 7 Docking iRobot Create Cover and Dock demo 15 Fourth Wheel 5 6 iRobot Command Module 16 Open Interface Commands 11 Sending from a Microprocessor 12...

Страница 19: ...act iRobot before contacting a retailer Please visit our web site at www irobot com for support tips frequently asked questions or information about accessories and other iRobot products We would like...

Страница 20: ...gister your iRobot Command Module today and SAVE 15 on all accessories 430 06 iRobot Command Module Plugs into Create and controls the robot with your own programs 2006 iRobot Corporation All rights r...

Отзывы: