A new add-on for the Raspberry Pi computer will allow you to control LEGO’s SPIKE robots, in a process that’s both educational and looks very fun.
Robots and LEGO must be two of the things that get children (or anyone for that matter) the most excited, so it’s good new to hear that the two will be combined thanks to a new add-on announced for the Raspberry Pi computer.
A ‘Hardware Attached on Top’, or HAT for short, is an add-on board for the device, and the Build HAT for the Raspberry Pi model B+ will permit you to control compatible LEGO robots from the SPIKE Prime or MINDSTORMS sets.
Here’s more detail on what a HAT is and how it works:
In a nutshell a HAT is a rectangular board (65x56mm) that has four mounting holes in the (nicely rounded) corners that align with the mounting holes on the B+, has a 40W GPIO header and supports the special autoconfiguration system that allows automatic GPIO setup and driver setup. The automatic configuration is achieved using 2 dedicated pins (ID_SD and ID_SC) on the 40W B+ GPIO header that are reserved for an I2C EEPROM. The EEPROM holds the board manufacturer information, GPIO setup and a thing called a ‘device tree‘ fragment – basically a description of the attached hardware that allows Linux to automatically load the required drivers.
On top of this piece of equipment, you’ll also need an extra power supply to run the motors.
The purpose of this collaboration is not just to have a great deal of fun, but also to teach important computer programming skills to youngsters, who must utilise Python code in order to bring their creations to life.
Available from The Pi Hut, the Built HAT costs £22.50, while the power supply costs £13.50.