Manty with Raspberry Pi and BrickPi

Remember the BrickPi Kickstarter campaign? It’s a shield from Dexter Industries that turns your Raspberry Pi into a LEGO compatible robot controller. The reward for my pledge came in a few weeks ago, and I’ve put it to use in one of my NXT robots: Manty.

Obviously, this robot works fine with the NXT, but now it can do everything that a Raspberry Pi can do. (Dexter Industries says they’ve developed the BrickPi for the classroom, but obviously they just wanted to build a six-legged walking xmbc media center which cleans the house and grabs drinks from the fridge on command).


Check out this video to see the robot in action. I’ve set up a C/C++ cross compiler within Eclipse to write programs for the Raspberry Pi/Brickpi from my desktop. (See Hertaville’s blog for details on how to set this up.)

You can download the source code for this robot here. If you’re new to the Raspberry Pi or the BrickPi, you’ll probably want to try the examples provided by Dexter Industries first.

Building Instructions

You can build this robot using the elements in a single NXT 2.0 kit. Click the picture below to go to the instructions. (Just skip the step where you add the NXT brick, or remove it afterwards.)

Click to go to the instructions

When you’re ready, make the following modifications:

About the author

19 Responses
  1. W. H. Bell

    The batteries will last a little longer with a model A Raspberry Pi, since the electrical current required for a model A is ~200mA less. If you are just using a USB dongle, then only one USB port is needed.

    1. If you have the A model, make sure you ask Dexter Industries if they support it before you buy the BrickPi. I think I read somewhere they support only model B – please correct me if I’m wrong.

      1. Matt

        Having used the BrickPi extensively with both RPi model A and B, I can confirm that there is no lack of functionality when using model A, and there is indeed a significant advantage when it comes to power consumption.

  2. Norph

    Hi. Can you please tell me if you are going to write a EV3 book? Because I really liked the NXT books and I can’t wait for the EV3 books to come out.

  3. Clinton Blackmore

    That is really cool, Laurens. I never even imagined cross-compiling from your desktop, running the code on the robot, and seeing the output back on your desktop. It is neat the power the Pi brings to LEGO robotics!

    1. Thanks Clinton!

      I’ve set it up for EV3 as well. I’m waiting for a C/C++ API to control the hardware. John Hansen is working on one. The last version I tested had motor and EV3 screen control.

  4. Serg

    Hi! I cant compile picpp.cpp((
    Eclipse say “WiringPi.h not found in module Brick.Pi.h”
    “I’ve had to fix some things to make BrickPi.h compile.” tell me please, HOW?

    1. I think it might be better to start with the C examples provided by Dexter Industries. When that works, you can try this robot.

      The changes I made to the driver file were only to make the cross compiler in Eclipse work. You won’t need to make those changes if you compile on the BrickPi itself.

      1. Serg

        I did all the examples of C provided by Dexter Industries – all works fine! I was interested to try your method -cross-compiling. I understand that the discrepancy in the file BrickPi.h (line 40). But what is wrong?

        1. Okay. In that case, you might want to start with a simple “HelloWorld” program for cross compiling so that you do not yet have to worry about the Dexter Industries dependencies. The BrickPi.h file provided by Dexter Industries is a bit messy. I traced down the compiler errors one by one and tried to fix them. If you send me an email through the contact page I can send you a complete zip file of my project, including the modified BrickPi.h.

Leave a Reply


EV3 Discovery

Discover the many features of the EV3 set, and learn to build and program your own robots! Learn more

Start Building Robots


Website Maintenance

Robotsquare is currently being updated, which means that it may look a little different (and not very polished) for a while. All the content and pages should still be there, though. It should be back and fully operational soon. Thanks for your patience!