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