Command Module (iRobot)
Home Propeller

To get you up and running with the Command Module, here are a couple of starter applications... - a small program demonstrating sending a few drive commands to the Create. - same as CMStart1 except this version polls the Create for Sensor Data. - built on CMStart2, this program implements a wall-follower, kinda like the built-in Mouse demo.

More applications are down below.

Here is how I use my sensors with my Command Module:

The Command Module uses the TWI interface (i2c) to talk to a Text-to-Speech module, Compass, LCD Display and Sonar.  I have also added a PIC to the i2c Slave mix which I call with some Sensor Data from the Create so other modules have access to the data.  The Command module only has 1 UART so it can only talk to the Create.  Luckily the i2c bus gives an additional communications path.  I connected the XBee radio to the USART port on the PIC to be able to relay data and commands to the PIC via i2c.  Check out the iRobot Forum for solutions on adding more UART's using any other available ports.

The Command Module is the i2c Master and continuously polls the i2c sensors for data or remote commands.  The Command Module also sends sensor data to the PIC to be available to be sent out it's Serial port via Radio for data logging.

If you need another UART on the Command Module, here is some code from JohnQ on the iRobot Create Forum which to allows you to use a couple of pins on the Command Module to add another "UART". 

Here are some more apps to get you going with the Command Module:
oi.h - Used by all apps.  Contains constants for Create OI.
JoeDrive.c - The last Main app I wrote for the Command Module.  Uses most of the sensors I've tested.
CompassTest.c - Use this to test the compass.h header for the Devantech CMPS03 i2c compass.  (scroll down, on the right side of this page to find the header files) - This is a complete AdBot project for the iRobot Create with the iRobot Crate Command Module.  Really it's a simple program that polls sensors and sits in an idle loop checking bumpers and randomly moving a little every 8 seconds.  It's a good bare-bones starter app.  It already handles some of the IR Remote buttons so you can drive it around with the remote as-is.  Just change the Main function a little to make it do whatever else you want, when you want it.  No additional sensors or anything special going on here, just some random movement with bumper and wheel-drop checking.


Some Command Module References:

Command Module
Source Code..........


Wall Following +
RFID Reader (3M)
RFID Reader 2
RFID Reader 3
RFID - Simple Scenario

Here is my currently working wall-seeking-following-rfid-tag-reading Create in action.  When you see the red light flashing it's reading an RFID tag (Can you find the tags?).

The idea is to store some info about the Tags and their location so the robot can choose what direction to continue in based on what tag it passed and what tag (room) it wants to go to next.  A lot of folks are working on this idea, we are all trying to figure out an efficient way to store and retrieve "map" data.

Since these tags are Writable it's conceivable to store the tags coordinates on the tag itself which can be read by the robot as it passes, reducing the robots need for additional memory to store waypoint details.  Each tag could store the neighbor tags directions and distances as well as it's own details.




All of my Source Code is compiled with the WinAVR package that came with the Command Module.  The PIC Source is compiled with Hi-Tech's C LITE (free) compiler.

All connections are done on a breadboard until it works the way I want.  Ace Hardware was kind enough to give me the Plexiglass, free, just ask if they have any scraps in back.  The Create has several well-placed mounting holes that I just happened to have standoffs that just screwed right in.


Software Toolbox


Here is a nice little GIF of the Command Module Pins.


This is a little more detail of my sensor and PIC connections to the Command Module.
Note: this changes constantly and may not be completely accurate at any time.

Sensor Header Files for the Command Module:

CMPS03 Compass (i2c)

LCD03 4x20 LCD (i2c)

SRF02 Sonar (i2c)

SP02 Text-to-Speech (i2c)


Serial-to-i2c (slave):

This is my way of interfacing anything Serial to the Create Command Module via the i2c bus.  This is a PIC with a USART and i2c interface.  The Command Module requests data from the PIC or posts data to the PIC via the i2c bus.  On this particular implementation the USART is connected to an XBee radio for remote monitoring and control.

Command Module Source

PIC 16F690 C Source