Raspberry Pi HAT opens up world of Lego

October 19, 2021 // By Nick Flaherty
Raspberry Pi HAT opens up world of Lego
Raspberry Pi has launched its first board to link to Lego Technic motors and sensors with Raspberry Pi computers.

The $25 Build HAT (Hardware Attached on Top) add on board is part of a new collaboration between Raspberry Pi and LEGO Education to increase the impact and reach of STEAM learning.​

“We are excited to work with Raspberry Pi to provide tools for students, teachers and makers all over the world to expand their creative digital skills and discover hands-on learning experiences,” said Andrew Sliwinski, Head of Product Experience, LEGO Education.

The Build HAT 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. It works with all 40-pin GPIO Raspberry Pi boards, including Raspberry Pi 4 and Raspberry Pi Zero. With the addition of a ribbon cable or other extension device, it can also be used with the Raspberry Pi 400 all-in-one.

The design of the Build HAT means that all the components are on the bottom, leaving room on the top of the board for a mini breadboard.

Related articles

The Lego Technic motors need an external 7.5V power supply and Raspberry Pi has developed a $15 48W power supply for the HAT with a 8V DC, 6A output and 1.5m connecting cable.

The available sensors, powered directly from the board, include a distance sensor, a colour sensor, and a versatile force sensor. The angular motors, which come in a range of sizes, include integrated encoders to precisely control movement, or use the encoders as input devices.

Raspberry Pi has also created a Python library for the Build HAT similar to other libraries such as gpiozero or the one for the Sense HAT. The Build HAT library already supports all the Lego Technic devices included in


Vous êtes certain ?

Si vous désactivez les cookies, vous ne pouvez plus naviguer sur le site.

Vous allez être rediriger vers Google.