Raspberry Pi gives you the power to control Lego robots |
The Raspberry Pi has released an add-on that allows the use of several inexpensive microcomputers to control some of the sensors and actuators of Lego robots.
This add-on is called HAT and it is a rectangular plate with four mounting holes in the corners.
Installing them through the device's GPIO pins gives you four ports that can be used to control the Lego Education SPIKE component.
It also connects to most other components using LPF2 ports, including components from the Lego Mindstorms Robot Inventor Kit.
There is also a Python library (a series of commands that can be used to control a robot) that can be used with HAT that allows you to write programs to control the connected parts of the robot.
Writing SPIKE components in Python is not a unique selling point for the Raspberry Pi. The SPIKE suite contains a hub that supports up to six devices and can also save and run Python programs.
However, you get more flexibility with the Raspberry Pi. You must use a separate computer or iPad to program the LEGO Center. By connecting your HAT architecture to your computer, you can connect it to your keyboard, mouse, and monitor, depending on which Raspberry Pi you're using.
The SPIKE hub also includes an LPF2 port. Although it has six ports compared to the four Build HAT ports. Although the Raspberry Pi has GPIO pins, you can use them to connect other devices, electronics, and sensors.
With Raspberry Pi you can control the motor
This provides a great deal of flexibility in what you can add to the bot. With Build HAT, you can also control triggers and sensors at a lower level.
The company said that by connecting the Build HAT to an 8-volt power source with a cylindrical connector, the Lego and Raspberry Pi accessories could power the same. If you don't have the correct power adapter, the company sells a specific 48W power adapter.
When kids want to interact with SPIKE robots while immersed in programming and setting up electronic products. Creating a HAT can be a convenient way to use available actuators and sensors to solve this problem.