Troubleshooting LMS-ESP32v2 Gamepad Connection with SPIKE Prime and Bluepad

Anton

Troubleshooting LMS-ESP32 with SPIKE Prime and gamepad

If your LMS-ESP32v2 fails to connect to the SPIKE Hub, follow these steps to diagnose the issue and determine if the board is defective. This guide is for you, if you use our Bluepad firmware for easily connecting a gamepad to LEGO® SPIKE Prime firmware or Pybricks firmware.

1. Basic Checks when troubleshooting LMS-ESP32v2 and pairing a gamepad

  • Firmware Installation:
    Ensure the LMS-ESP32 is flashed with BluePad32 LPF2 for Spike3 and Pybricks (latest version, e.g., 20250302). Flash it via Chrome from Anton’s Mindstorms Firmware tool.
  • Physical Connection:
    Connect the LMS-ESP32 to the SPIKE Hub using the flat cable. The hub can run Pybricks or LEGO SPIKE firmware. Verify the cable is fully inserted. Remove all other connections like USB and other motors.
  • Check LEDs:
    First, only the RGB LED should light red, then after two seconds, the RGB LED should turn green and the PWR led should turn red (on).
  • Reset the Device:
    If the LEDs don’t light up correctly, press the tiny reset button (next to the USB port) while the LMS-ESP32 is connected to the SPIKE Hub. If that still doesn’t work, go to the Bluepad Configurator test.
  • Controller Pairing:
    Pair your controller. The LED should turn blue+green when paired.

2. Test with Bluepad Configurator Web Interface

  1. Connect the LMS-ESP32 to a computer via USB.
  2. Visit bluepad.antonsmindstorms.com.
  3. Pair your controller and test inputs.
  • If successful: The issue is likely with the SPIKE Hub connection.
  • If failed: Proceed to advanced diagnostics.

3. Advanced Diagnostics: Serial Communication Test for Troubleshooting LMS-ESP32v2

Objective: Check if the LMS-ESP32’s TX/RX pins are functional.

  1. Flash MicroPython Firmware:
  1. Upload Test Code:
    Use Viper IDE to upload this script:
from machine import UART, Pin
from time import sleep_ms
RX_PIN = 7  # Use 18 for LMS-ESP32v1
TX_PIN = 8  # Use 19 for LMS-ESP32v1

u = UART(1, rx=RX_PIN, tx=TX_PIN, baudrate=115200)
i = 0
while True:
   i += 1
   u.write(f'test {i}')
   u.flush()
   resp = u.read()
   if resp:
       print(resp.decode())
   sleep_ms(500)
  1. Short TX and RX Pins:
  • Use a jumper wire to connect TX and RX pins on the LMS-ESP32’s LEGO connector.
  • If the terminal displays test [n], the serial communication works.
  • No output? The TX or RX pins are faulty.
LMS-ESP32v2 with Micropython on Viper IDE and RX/TX Pins connected.

4. Requesting a Replacement

If you identify any of these problems, contact us.

  • A defective cable (e.g., TX pin failure).
  • A non-responsive LMS-ESP32 (even after resetting and reflashing)
  • Non-responsive TX/RX pin.

The easiest way to contact us, is by replying to your order confirmation email. If you received a faulty unit, we can send a replacement. When you contact us, please include the results of your tests, photos of your setup and the details of your order.

Like this article? Help us make more!

Your support matters

We appreciate your support on Patreon and YouTube! Small things count.

Become a Patron

Don't miss a thing

Subscribe below to get an email when we publish a new article.

Share this with someone who needs to know

Leave a Reply

Item added to cart.
0 items - 0.00