This Raspberry Pi add-on lets you control Lego robots

Raspberry Pi is releasing an add-on that will let you use many of its tiny, inexpensive computers to control certain Lego robot motors and sensors. The add-on is called the Build HAT (HAT stands for Hardware Attached on Top), and slotting it onto a Raspberry Pi’s GPIO pins will give you four ports that you can use to control Lego Education’s SPIKE components, which the HAT and its software are specially designed for. It’ll also connect to most other parts that use an LPF2 connector, including the components from the Lego Mindstorms robot inventor kit.
There’s also a Python library (basically a set of commands you can use to control the robot) available to go alongside the HAT, which will let you write software to control the robot parts you’ve got hooked up. Programing Lego’s SPIKE components with Python isn’t a unique selling feature from Raspberry Pi — the SPIKE kit comes with a hub that supports connecting six devices (compared to the Build HAT’s four) that can also store and run Python programs.
However, you’re going to get more flexibility with a Raspberry Pi. You have to program Lego’s hub using a separate computer or iPad, whereas the Build HAT will be attached to its own computer that you can likely plug a keyboard, mouse, and monitor into, depending on which Raspberry Pi you’re using. The SPIKE Hub also only has LPF2 ports (though it has six, compared to the Build HAT’s four), whereas the Pi has GPIO pins that you can use to connect other devices, electronics, and sensors. That gives you a ton of flexibility in what you can add to your robots. The Build HAT also will let you control your motors and sensors at a lower level if that sort of thing is your jam.

Raspberry Pi says that hooking the Build HAT up to an 8V power supply with a barrel plug will let it provide juice to both the Lego accessories connected to it and the Raspberry Pi itself. The company will sell a specific 48W power supply to go along with it if you don’t have one that’s capable.
This is obviously a pretty niche product, but I’m glad it exists. If your kid or students are playing around with Lego’s SPIKE robots but want to go deeper into programming and electronics modding, the Build HAT could be a good way to help them do that with the motors and sensors you already have. Plus, Raspberry Pi and Lego seem to be a perfect match for each other — both brands have a sort of DIY spirit and could make some interesting projects if they end up doing more work together.
Raspberry Pi is releasing an add-on that will let you use many of its tiny, inexpensive computers to control certain Lego robot motors and sensors. The add-on is called the Build HAT (HAT stands for Hardware Attached on Top), and slotting it onto a Raspberry Pi’s GPIO pins will give…
Recent Posts
- Razer’s new Blade 18 offers Nvidia RTX 50-series GPUs and a dual mode display
- I tried adding audio to videos in Dream Machine, and Sora’s silence sounds deafening in comparison
- Sandisk quietly introduced an 8TB version of its popular portable SSD, and I just hope they solved its previous big data corruption issue
- iPhones are briefly changing ‘racist’ to ‘Trump’ due to an iOS dictation issue
- We finally know who’s legally running DOGE
Archives
- February 2025
- January 2025
- December 2024
- November 2024
- October 2024
- September 2024
- August 2024
- July 2024
- June 2024
- May 2024
- April 2024
- March 2024
- February 2024
- January 2024
- December 2023
- November 2023
- October 2023
- September 2023
- August 2023
- July 2023
- June 2023
- May 2023
- April 2023
- March 2023
- February 2023
- January 2023
- December 2022
- November 2022
- October 2022
- September 2022
- August 2022
- July 2022
- June 2022
- May 2022
- April 2022
- March 2022
- February 2022
- January 2022
- December 2021
- November 2021
- October 2021
- September 2021
- August 2021
- July 2021
- June 2021
- May 2021
- April 2021
- March 2021
- February 2021
- January 2021
- December 2020
- November 2020
- October 2020
- September 2020
- August 2020
- July 2020
- June 2020
- May 2020
- April 2020
- March 2020
- February 2020
- January 2020
- December 2019
- November 2019
- September 2018
- October 2017
- December 2011
- August 2010