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).

Video

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.)

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.

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.

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!

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?

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.

Discover LEGO MINDSTORMS EV3

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!