Build HAT
By Ben Everard. Posted
This article was originally published as part of HackSpace magazine, which has since been incorporated into Raspberry Pi Official Magazine.
LEGO® has introduced generations of children to making. The little blocks slot together in almost endless possibilities and, if you add in mechanical components from Technic sets, you can create some complex builds.
Through the years, LEGO® has built a few different programmable electronics systems for adding silicon brains to your builds. MINDSTORMS® and SPIKE Prime Sets have given users an interface for controlling their plastic bricks with code and, through this, have introduced countless children to physical computing.
Advertisement
Get started with Raspberry Pi – everything you need to know to start your journey!
Of course, LEGO® is not the only organisation helping children learn physical computing, so perhaps it’s inevitable that LEGO® and Raspberry Pi have worked together to create the Build HAT. This add-on to Raspberry Pi computers lets you control the latest generation of LEGO® motors and sensors from Python code running on your Raspberry Pi. Here, of course, you have access to the full range of modules and hardware that you can usually connect to your Raspberry Pi. With extended headers, you can connect additional HATs, or other components, to the GPIO pins as long as they don’t use the UART connection (14 and 15).
To make it easy to mount your Raspberry Pi, LEGO® has created the Maker Plate. This lets you attach your Raspberry Pi securely to your build.
More power
While you can power the Build HAT directly from Raspberry Pi, the motors run at 7.5 V, so you’ll need an additional power connection to the barrel jack on the Build HAT if you want to run motors. Raspberry Pi has also launched an official power supply for this.
There are four connections on the Build HAT that can talk to sensors and motors from the SPIKE Prime kits, or the most recent generation of LEGO® Technic. The available options include motors with integrated sensors for precise control, distance sensors, force sensors, colour sensors, LED matrices, and more.
The Build HAT and power supply are available now from all the usual Raspberry Pi suppliers, for $25 and $15 respectively.
While the Build HAT was designed for education, there’s plenty for makers to get their teeth into. Want to live-stream video from your LEGO® car? Add a Raspberry Pi camera. Want to trigger your LEGO® build from data on the internet? If you can get the data onto your Raspberry Pi, you can send it to your LEGO® build. Want a platform to quickly prototype an idea for a project? There aren’t many quicker ways of building than plugging LEGO® bricks together.
Ben is the Editor of HackSpace magazine. When not wrangling words, he enjoys cycling, gardening, and attempting to identify wild mushrooms.
Subscribe to Raspberry Pi Official Magazine
Save up to 37% off the cover price and get a FREE Raspberry Pi Pico 2 W with a subscription to Raspberry Pi Official Magazine.
More articles
New year, new projects
What ideas and experiments will 2026 bring?
Read more →
Get started with Raspberry Pi in Raspberry Pi Official Magazine 161
There’s loads going on in this issue: first of all, how about using a capacitive touch board and Raspberry Pi 5 to turn a quilt into an input device? Nicola King shows you how. If you’re more into sawing and drilling than needlework, Jo Hinchliffe has built an underwater rover out of plastic piping and […]
Read more →
Win one of three DreamHAT+ radars!
That’s right, an actual working radar for your Raspberry Pi. We reviewed it a few months ago and have since been amazed at some of the projects that have used it, like last month’s motion sensor from the movie Aliens. Sound good? Well we have a few to give away, and you can enter below. […]
Read more →