Raspberry Pi Build HAT, Connecting Raspberry Pi with LEGO

SKU: 21236
Part Number: Raspberry Pi Build HAT
Brand: Raspberry Pi Foundation


Related Products:



Raspberry Pi Build HAT, Connect Raspberry Pi computing power with LEGO Technic motors and sensors
Raspberry Pi Build HAT

Raspberry Pi X LEGO

Build robust, intelligent machines
that combine Raspberry Pi computing power with LEGO components.

Product features

The Raspberry Pi Build HAT fits any Raspberry Pi with a 40-pin GPIO header and lets you control up to four LEGO Technic motors and sensors from the LEGO Education SPIKE Portfolio, a flexible system with unlimited possibilities.

  • Onboard Raspberry Pi RP2040 microcontroller manages low-level control of LEGO Technic devices
  • Onboard 4x LPF2 connectors for LEGO Technic motors and sensors
  • Raspberry Pi 40PIN GPIO interface
  • With external 8V power supply, allows powering your Raspberry Pi (except Raspberry Pi 400, cause it can't be powered via GPIO) and all connected devices
RP2040 microcontroller
Controls various sensors and motors

The LEGO Education SPIKE Portfolio features a wide variety of sensors and motors that you can control with the Build HAT Python library on your Raspberry Pi. Explore the world around you with sensors to detect distance, force, and colour, and choose from a variety of motor sizes to suit any build. The Build HAT also supports motors and sensors from the LEGO MINDSTORMS Robot Inventor kit, as well as most other LEGO devices that use an LPF2 connector.

More Application examples

Build with Raspberry Pi and the LEGO bricks you love
The new, specially designed LEGO Maker Plate is the first LEGO element ever designed to connect to something that isn’t another piece of LEGO. It allows you to attach your Raspberry Pi to your LEGO creations, and it's available with the SPIKE Prime Expansion Set (45681).

In the classroom
Easily integrate LEGO Education SPIKE Prime with Raspberry Pi computers. Supported by guided projects from the Raspberry Pi Foundation designed for secondary school students, the Raspberry Pi Build HAT delivers a unique hands-on learning experience that's accessible, engaging, and confidence-building for all students.


Weight: 0.036 kg

Quick Overview

  1. Raspberry Pi Build HAT x1