SerialTalk: Universal Micropython Serial Remote Procedure Library for MINDSTORMS Robots

| | ,

If you’re a LEGO MINDSTORMS enthusiast, then the SerialTalk Micropython library is your ticket to taking your custom hardware projects to the next level. Developed to serve as a universal integration tool, SerialTalk offers unparalleled versatility and ease of use. Let’s dig in!

One Library to Rule Them All

SerialTalk was born out of the need for a single, cohesive way to bring all our custom hardware projects under one roof. Whether you’re working with UART, Sockets, Bluetooth Classic, BLE, or any other serial protocol, SerialTalk has you covered. When it comes to MINDSTORMS Robot Inventor, this library is the fastest and most versatile method for brick-to-brick communication over Bluetooth.

Making It Work

Here’s the best part: You can simply define functions and their return formats, then call them from another Python program. Sounds simple? It is!

Here’s a small code snippet to demonstrate SerialTalk with LMS-ESP32 and MINDSTORMS EV3:

# On the LMS-ESP32 side
from import SerialTalk

st = SerialTalk()

def get_temperature():
    return 22.5  # Replace this with your sensor data

# Pass the function and the struct type of the result. Here it's f for floating point number.
st.add_command(get_temperature, 'f') 


# On the MINDSTORMS EV3 side, using Pybricks on ev3dev.
from import SerialTalk
from pybricks.parameters import Port

st = SerialTalk(Port.S1)
ack, temp ='get_temperature')
print(f"Temperature is {temp}")

Application of SerialTalk: Smart Camera ball grabber

With the Smart Camera Ball grabber, I’m using SerialTalk to pass the size of the ball and the location on the camera sensor to the MINDSTORMS EV3 brick. Communication is so fast that I can easily implement a feedback loop on the EV3 and steer towards the ball smoothly.

The OpenMV camera also has an I2C voice recognition sensor plugged in. SerialTalk also transfers the voice command it recognizes to the EV3 brick. Now the brick is like a pet! I can say: “Hey brick, go forward!” Or “Hey brick, fetch ball!”

You can see how fast the EV3 reacts to the camera and voice commands on Instagram.

SerialTalk: A Micropython Toolbox for Your Projects

SerialTalk is super handy for a wide array of applications. We use it mostly to talk to our LMS-ESP32 board or our OpenMV camera. See the full SerialTalk library on GitHub.

  • Sensors
  • Displays
  • Smart Cameras
  • Computer Vision
  • Remote Control
  • Custom Electronics

Some of our older projects use UartRemote for the same purpose. SerialTalk is 100% compatible with UartRemote. SerialTalk is just more versatile and better maintained.

Cool SerialTalk Micropyton Project Ideas

Let’s get those wheels turning! Here are some project ideas you could try with SerialTalk:

  1. Weather Station: Use sensors to collect weather data and display it on your MINDSTORMS robot.
  2. Security Bot: Integrate a smart camera for facial recognition.
  3. Remote-Controlled Car: Control your LEGO car from your computer or phone.

Got a cool project? Share your creations on social media and tag @antonsmindstorms. I’m eager to see and share your innovative designs!

Get Involved with Serial Talk

Interested in diving deeper? You can find all the documentation you need on Whether you’re a beginner or a seasoned pro, there’s something for everyone to learn and contribute.

So there you have it! SerialTalk Micropython library offers a streamlined, efficient, and highly versatile way to level up your MINDSTORMS projects. Go unleash your creativity!


How to Make Your LEGO SPIKE Robot Understand Speech!

Make your custom robot electronics speak like a custom LEGO sensor with PUPRemote Library


5 thoughts on “SerialTalk: Universal Micropython Serial Remote Procedure Library for MINDSTORMS Robots”

  1. Very excited to give SerialTalk a try. What if you want to communicate with both a LMS ESP32 and a OpenMV from your Mindstorms Hub? I’m guessing you need to use a separate port on the hub for each one. Can you use Serial Talk for both boards or do you need to use UartRemote for one board and Serial talk for the other. (In the past, I tried to use uartRemote for both boards and it didn’t work.).

  2. Do you have any plans to post step by step tutorials for SerialTalk projects like you did for UartRemote? The tutorials were a huge help and I probably couldn’t have started using UartRemote without them. Also, can I just use the version of Python that comes with LEGO Mindstorms Inventor instead of PyBricks?


Leave a Reply

Item added to cart.
0 items - 0.00
%d bloggers like this: