The Raspberry Pi Build HAT (Hardware Attached on Top) is a new add-on board for your Raspberry Pi. It connects to the 40-pin GPIO header and can be used to control up to four LEGO Technic motors and sensors from the LEGO Education SPIKE Portfolio.
The cool design of the Build HAT means that all the components are on the bottom, leaving room on the top of the board for LEGO Minifigures to hitch a ride, or for a mini breadboard. You can connect the HAT directly to your Raspberry Pi with the attached header, using 9mm spacers to ensure a stable fit, or you can add an extra-tall header to keep the unused GPIO pins accessible. Whichever method you choose, make sure you position the Build HAT the right way round when installing it on your Raspberry Pi!
It provides four connectors for LEGO Technic motors and sensors from the LEGO Education SPIKE Portfolio. The available (sold separately) sensors include a distance sensor, a color sensor, and a force sensor. The angular motors come in a range of sizes and include integrated encoders that can be queried to find their position.
The Build HAT fits all Raspberry Pi computers with a 40-pin GPIO header, including including Pi 5, Raspberry Pi 4 and Raspberry Pi Zero. With the addition of a ribbon cable or other extension device, you can also use it with Raspberry Pi 400.
Connected LEGO Technic devices can easily be controlled in Python, alongside standard Raspberry Pi accessories such as a camera module. The Raspberry Pi Build HAT power supply, available separately, is designed to power both the Build HAT and Raspberry Pi computer along with all connected LEGO Technic devices.