Skip to content

LEGO Mindstorms Setup

yelu728 edited this page Nov 8, 2021 · 3 revisions

(Optional) Remove Bluetooth widget icon in Raspberry Pi OS

When you connect a Lego Hub to the Raspberry Pi, you are essentially performing a Bluetooth pairing. By default, the Bluetooth widget in the Raspberry Pi OS will show a popup window to ask the user to confirm this pairing. However, we simplified the pairing process and no longer required the user to confirm. Doing so ensures that headless Raspberry Pi users do not get stuck on the confirmation popup. Therefore, we suggest that all our users remove the Bluetooth widget from the Raspberry Pi OS desktop to ensure that the confirmation popup does not appear. Follow the steps below to do this. The easiest way to perform these steps is to attach a display to the Raspberry Pi.

  1. In the desktop's upper right corner, right-click on the Bluetooth icon.
  1. Select Remove "Bluetooth" From Panel.
  1. The Bluetooth widget is now removed. As a result, you will no longer see any confirmation popup when connecting a LEGO hub to the Raspberry Pi.

1. LEGO Mindstorms Robot Inventor Kit Setup

Before proceeding, make sure you first set up the Robot Inventor/Spike Prime Hub by following the instructions from the LEGO Inventor mobile app.

Most importantly, make sure you update the hub's firmware and motors to the latest version using the official LEGO Mindstorms App.

Once the hub is updated correctly, you can connect the hub to a Raspberry Pi 4B using Bluetooth. Press the Bluetooth button on the Robot Inventor Hub. You will see this hub with its MAC address in CAIT's Visual Programming Interface. Once the hub is added into the Initialize Control block, CAIT will take care of the connection and control.

Now you are ready to control your Mindstorms robots through CAIT's Visual Programming Interface, read more about how to do this in here.

We recommend an external power HAT such as the PiJuice HAT for better portability. Alternatively, you may connect an off-the-shelf battery bank to the Raspberry Pi's USB-C port to provide power.