With so many LEGO hubs, programming systems and firmware options, the choice for LMS-ESP32 firmware can be daunting. We’ve worked hard to support everything. The upside is that it gives you many possibilities. The downside is that it’s difficult to choose from these options. In this article, you’ll find an overview of all choices with their pros and cons.
The most popular application of the LMS-ESP32 board is gamepad remote control. For that purpose, we have developed the Bluepad firmware. While it’s built around gamepad support, it adds possibilities for LEDs and servos. Over the past year, we’ve improved our integration of Bluepad32 into firmware compatible with LEGO hubs. This work has led to the development of two firmware variants which can be uploaded to the LMS-ESP32 using our online firmware upload page:
- Bluepad32 LPF2: Compatible with hubs running legacy MINDSTORMS Robot Inventor, SPIKE Legacy, the new SPIKE 3, and the open-source Pybricks.
- Bluepad32 UartRemote: Only compatible with Inventor or SPIKE Legacy hubs programmed in Python.
This article will help you pick the right Bluepad firmware based on your LEGO hub and programming environment. Alternatively, you can use our interactive form to determine the best firmware.
LMS-ESP32 firmware support for different hub programming environments
We discern the following programming environments for LEGO hubs :
- Pybricks: This is the open-source programming environment that runs on almost any Lego hub
- SPIKE3: This is the newest SPIKE Education software, only running on the yellow SPIKE and SPIKE Essential hubs.
- SPIKE Legacy: This is the SPIKE Legacy software which can still be downloaded and used
- Inventor: This is the legacy MINDSTORMS Robot Inventor software. It runs on both the teal Robot Inventor hub and the yellow SPIKE hub. It was officially supported until the end of 2024.
The table below highlights which features are available in each version of the firmware.

Each hub programming environment supports either Blocks or Python. The functionality you get with Bluepad32 depends on your choice of environment and programming language. We grouped all the example code in a new Bluepad repository.
Bluepad32 LPF2 firmware
This firmware lets the LMS-ESP32 act a Lego sensor and makes the hub believe an original sensor is connected. Using the online Bluepad web configurator, you can choose whether it emulates a Light sensor or a 3ร3 Light matrix.
Below, you’ll find the tutorials for the different programming environments.
Pybricks
We provide the bluepad.py library for Pybricks to unlock all the features in your Pybricks blocks or Python programs. For examples, see our GitHub Pybricks example directory. We published some posts that cover the integration of Bluepad32 with Pybricks. We have updated all the material to be compatible with the latest Bluepad32 firmware.
Examples for Pybricks Blocks:
- Gamepad remote control with Pybricks Blocks coding
In this post, we will show how to use a Bluetooth gamepad with Pybricks Block Coding. - Pybricks custom Blocks for Gamepad Block coding
We created some custom blocks in Pybricks Block Coding, to make it easy for you to integrate a gamepad controller in your block code. In this blog you get an overview of all blocks we created and the way they work.
Examples for Pybricks in Python
- Remote Control a LEGO Technic with a Gamepad Like the PS4 Sixaxis
This blog post will walk you through building a remote-controlled car using a PS4 Sixaxis gamepad. - Connect Gamepads and NeoPixels to Your Pybricks Lego Hub with Ease
In this comprehensive tutorial, you will discover the exact steps to harness the full potential of the BluePad32 firmware on the LMS-ESP32 board. - Troubleshooting the gamepad connection with LMS-ESP32
This post gives some tips and tricks to troubleshoot pairing issues with your Bluetooth gamepad, Pybricks and the LMS-EPS32 board. It is a step-by-step troubleshooting guide to find and eliminate these problems.
SPIKE3
Examples with SPIKE3 Word Blocks:
- Color Sensor Emulation
- How to use a Gamepad with SPIKE Prime Work Blocks
This blog post shows how you can use the word blocks in the official LEGO SPIKE Prime 3.0 (SPIKE3) program! This guide walks you through the setup for your first spike word blocks gamepad program.
- How to use a Gamepad with SPIKE Prime Work Blocks
- Color Matrix Emulation
- How to connect a Gamepad and drive NeoPixels with your SPIKE Prime hub
This blog post shows how to control NeoPixel LEDs while controlling your robot with a Gamepad.
- How to connect a Gamepad and drive NeoPixels with your SPIKE Prime hub
Examples with SPIKE3 Python code:
- Color Sensor Emulation
- Example for reading Gamepad in SPIKE3 python: bluepad_spike3_color_python.py
- Show pixels on the 5ร5 Light Matrix controlled by a gamepad. Download this file and load it in the SPIKE3 environment.
- Color Matrix Emulation
- Example for reading Gamepad in SPIKE3 python: BluePad32_3x3_matrix_gamepad.py
Bluepad32 UartRemote firmware
This firmware implements the UartRemote protocol for the communication between the LMS-ESP32 and the Lego hub.
Inventor & SPIKE Legacy
Python:
- Python (PS4) gamepad connection Robot Inventor and SPIKE Prime legacy hub
This blog show in a step-by-step guide how to set up your LMS-ESP32 and Lego hub to start using UartRemote for Bluepad. It gives you a small demo program and explains what Python commands are available to read the gamepad, set NeoPixels and drive Servo motors.
Word Blocks
- How to connect Bluetooth gamepad to the LEGO hub directly using a word blocks program
In this blog, we explain how to connect a Bluetooth gamepad to the SPIKE Prime legacy or Robot Inventor hub with Word Blocks/Scratch.
We’re eagerly awaiting your builds!
Hopefully, this blog gives you an overview of all the combinations of the different LMS-ESP32 Bluepad firmware and programming environments for your hub. By identifying your needs, and considering the preferred programming environment, the matrix will show you the possibilities and the restrictions you have when using a gamepad in your project. We’re excited to see what you’ll build! Send an email or tag us on social media.