C3Pi is our experimental tracked robot with an onboard Raspberry Pi and an Arduino.

The Pi drives the Arduino over I2C, and the Arduino drives a motor controller board using PWM.

The Python program that drives the Pi uses our I2C library; it’s about four lines of code.

At the moment all we do is respond to a character sent by the Pi by doing a little dance like a bee that has just found some honey. The next step is to define a simple protocol that will allow the Pi to set C3Pi’s speed and direction. After that we will add a Sharp distance sensor which will tell the Pi to stop the motor if C3Pi approaches an obstacle.

We’re using a SparkFun logic level shifter to interface the 3.3v I2C levels on the Pi to the 5v on the Arduino. Here’s a picture of the current configuration:

C3Pi with Raspberry Pi, Arduino and I2C

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>