The BrickPi is a RasbperryPi add-on that lets you control Lego Mindstorm parts. The BrickPi stacks on top of the Raspberry Pi and accepts Lego Mindstorms motors and sensors.
Covered in This Tutorial
In this tutorial, we will cover how to get started with the BrickPi. We will show you how to connect the BrickPi to a Raspberry Pi, attach Legos, connect motors/sensors, and write a simple Python script to control the motors/sensors.
- Raspberry Pi
- SD Card
- Monitor of some sort
- HDMI Cable or Composite cable
- Wall Adapter Power Supply – 9VDC
- DC Barrel Jack Adapter – Female
- 9V Snap Connector
- Keyboard and mouse
- Lego Mindstorms Servo Motor
- Lego Mindstroms Touch Sensor
NOTE: The servo motor and touch sensor can also be found within the Lego Mindstorms NXT set.
Configure SD Card
IMPORTANT: You need to use Dexter Industries’ custom Raspbian build to get the BrickPi to work.
- Download Dexter Industries’ Raspbian build
- Download Win32DiskImager
- 7-Zip to unzip the .rar Raspbian image
Flash the SD Card
- Insert the SD Card into your computer
- Install Win32DiskImager
- Unzip Dexter Industries’ Raspbian build (use 7-Zip if the image is in .rar form)
- Run Win32DiskImager with administrative privileges
- Select the unzipped Dexter Industries’ Raspbian build as the Image File
- Select the location of the SD Card
- Click “Write”
You will need to build the hardware around the BrickPi in order to connect it to the Raspberry Pi and Legos.
Build the Case
1) Unpack the BrickPi hardware and remove the protective paper from the case.
Any of the Lego Mindstorms sensors can be attached to the ports labeled with an “S” followed by a number. You will need to remember the port number that you plugged your sensor into.
For more detail: Getting Started with the BrickPi