User Manual

3. Using the m3pi
The m3pi robot was designed to work with an mbed development board [https://www.pololu.com/
category/128/mbed-microcontrollers] as the main robot controller, sending serial commands to a slave 3pi
base, but it can also be used with a programmable Wixel module [https://www.pololu.com/product/1336]
as the main robot controller or as a wireless interface for a remote main controller, or you can let the
3pi itself be in control by programming it directly to do what you want. How you get started with the
m3pi will depend on the way you decide to use the robot.
3.a. mbed in Control
The m3pi was designed as a robot platform for an mbed
development board [https://www.pololu.com/category/128/
mbed-microcontrollers], and using an mbed as the main
controller of the m3pi robot is the easiest way to take
advantage of all the features of the m3pi. The mbed also
adds plenty of processing power and free I/O lines to the
m3pi robot.
As long as the 3pi robot base is running its stock serial
slave program or the most recent version of the 3pi
demo program, a socketed mbed can control the 3pi
base through a series of serial commands while
simultaneously performing high-level tasks like wireless
communication (e.g. via a Wixel, XBee, Bluetooth, or
Wi-Fi), route planning, sensor processing, and data logging. The m3pi cookbook [http://mbed.org/
cookbook/m3pi] on mbed.org [http://mbed.org] provides a high-level overview of using the mbed with an
m3pi and a sample “hello world” program.
The general procedure for programming an mbed controlling an m3pi is very similar to normal mbed
development:
1. Turn off the m3pi and connect the mbed via USB to your computer; the mbed does not need
to be disconnected from the m3pi.
2. Compile your m3pi program in the mbed online compiler.
3. Copy the downloaded program file to the mbed’s mass-storage drive.
4. Disconnect USB, and turn the m3pi back on.
The 3pi robot included with the fully-assembled m3pi is pre-programed with a serial slave program
[https://www.pololu.com/docs/0J21/10.a] that works well with the m3pi library [http://mbed.org/users/chris/
Pololu m3pi User’s Guide © 2001–2017 Pololu Corporation
3. Using the m3pi Page 20 of 39