Pololu 3pi Robot User Manual

Page 48

Advertising
background image

(XBee,

Wixel

[http://www.pololu.com/product/1337]

, Bluetooth, etc). Please note that the m3pi robot is also available fully

assembled. Please see the

m3pi robot product page

[http://www.pololu.com/product/2151]

for more information.

Pololu m3pi expansion kit.

Pololu m3pi robot controlled by an ARM

mbed development board.

Complete documentation of the serial functions used here can be found in

Section 10

of the

Pololu AVR Library

Command Reference

[http://www.pololu.com/docs/0J18]

.

This slave program receives serial data on port PD0 (RX) of the 3pi and transmits responses (when necessary) on
port PD1 (TX), using a 115.2 kbaud, TTL-level serial protocol. In this example, there are no parity bits, 8 data bits,
and one stop bit (N81). The commands implemented here each consist of a single command byte followed by zero or
more data bytes. To make it easy to differentiate the command bytes from the data bytes, the command bytes are all
in the range 0x80-0xff, while the data bytes are in the range 0x00-0x7f. That is, the command bytes have their most
significant bits set, while the data bytes have that bit unset.

Some commands result in the 3pi sending data back out to the controlling device. For commands where integers are
sent back, the least significant byte is sent first (little endian).

If bad commands or data bytes are detected, the slave program beeps and displays an error message on the LCD. This
means that if you are using the

expansion kit without cutouts

[http://www.pololu.com/product/978]

, you should probably

remove the LCD-related commands before loading the program onto your 3pi.

The following commands are recognized by the slave program:

Pololu 3pi Robot User's Guide

© 2001–2014 Pololu Corporation

10. Expansion Information

Page 48 of 63

Advertising