Listen "MicroPython with Matt Trentini"
Episode Synopsis
We talk with Matt Trentini, Principal Software Engineer at Planet Innovation, about using MicroPython for professional embedded development—including medical devices. Matt shares how he was drawn back to embedded development after becoming jaded with traditional C-based workflows, and explains why MicroPython's interactive REPL and rapid development cycle have become game-changers for his team.We explore the practical realities of using an interpreted language on microcontrollers: how Planet Innovation uses it for Class B medical devices, what the performance trade-offs actually look like, and how features like the Unix port enable robust testing. Matt walks us through deployment considerations, explains how to integrate C code when needed, and shares compelling stories about real-time client demos that would be impossible in C++.Whether you're skeptical about high-level languages in embedded systems or curious about alternatives to traditional development workflows, this conversation offers a grounded, engineering-focused look at what MicroPython can—and can't—do in production environments.Key Topics[03:30] Matt's background and why he left embedded development before MicroPython brought him back[08:45] What MicroPython is: a complete re-implementation of Python for microcontrollers with REPL, filesystem, and machine module[13:20] How Planet Innovation introduced MicroPython through an OpenMV vision processing project[17:15] The game-changing power of the REPL for interactive hardware development and testing[21:40] Running MicroPython code on x86 for testing, and the mock machine library approach[26:30] Python library compatibility: what works, what doesn't, and memory considerations[29:50] Integrating C and C++ code through extension modules for performance-critical sections[33:10] Performance realities: 10-100x slower in interpreter, but can always drop to C speed when needed[37:45] Tooling: MPRemote, the magical mount feature, and development workflow[42:20] When NOT to use MicroPython: cost-sensitive high-volume products and resource constraints[45:30] Using MicroPython in Class B medical devices and safety-critical applications[49:15] Garbage collection: simple, predictable, and controllable—can be disabled when needed[52:40] Real-time client demo story: modifying state machines during a call and showing results immediately[56:20] Deployment: frozen code, disabling REPL and filesystem, and OTA considerations[01:01:30] Common mistakes: logic errors and inadvertent allocations rather than memory corruption[01:05:45] Threading, AsyncIO, and the Global Interpreter Lock across different ports[01:08:20] State machine frameworks: StateChart, Yasme, and PyTransitions[01:11:40] Junior developer productivity: faster onboarding compared to C/C++ embedded development[01:15:10] Getting started: board bring-up as an ideal first use case for MicroPython[01:17:50] Hardware-in-the-loop testing as a low-risk way to try MicroPythonNotable Quotes"It's hard to overstate how game changing the REPL is. Particularly as an embedded engineer, once you see that you can interactively talk to a peripheral, you can generate your own I2C, squirt it across and see what the peripheral does with it—suddenly driver development has just become easy to experiment with." — Matt Trentini"My trite answer is that MicroPython is slow—10 to 100 times slower than C in the interpreter. But my flip side answer is that it can always be made as fast as C because you can always drop into C to write things." — Matt Trentini"There was a moment in a recent project where we were discussing the workflow of a state machine with the client, and while we were on a call, another engineer was actually making changes to MicroPython code. Literally a couple minutes after we'd been hashing out the details, they showed the changes in the state machine using the REPL. The client was blown away—in 25 years of development, I have never had that kind of turnaround in C and C++." — Matt Trentini"If you want to make a good friend of your electronics engineers, give them a build of MicroPython that can run on their custom board. In the past, they would typically be waiting for weeks or sometimes months before a software resource could be assigned. Now I can turn around a MicroPython build in a day or two, and they can test I2C, GPIOs, and UARTs themselves." — Matt Trentini"The irony is that the people who have embedded C knowledge are actually the people that can benefit the most from MicroPython. It's like having a superpower—you understand what MicroPython is doing in the background, you know you're just effectively writing a lot less code." — Matt TrentiniResources MentionedMicroPython Official Site - The official MicroPython project website with documentation and downloadsOpenMV - Computer vision project using MicroPython for camera-based applicationsMPRemote - Tool for interacting with MicroPython devices, including the magical mount featurePlanet Innovation - Medical device consultancy using MicroPython in production devicesStateChart - State machine library compatible with Python and MicroPythonYasme - Yet another state machine library developed at Planet InnovationPyTransitions - Popular Python state machine library being ported to MicroPythonCircuitPython - Adafruit's fork of MicroPython with additional features and CPython compatibility focus
You can find Jeff at https://jeffgable.com.You can find Luca at https://luca.engineer.Want to join the agile Embedded Slack? Click hereAre you looking for embedded-focused trainings? Head to https://agileembedded.academy/Ryan Torvik and Luca have started the Embedded AI podcast, check it out at https://embeddedaipodcast.com/
You can find Jeff at https://jeffgable.com.You can find Luca at https://luca.engineer.Want to join the agile Embedded Slack? Click hereAre you looking for embedded-focused trainings? Head to https://agileembedded.academy/Ryan Torvik and Luca have started the Embedded AI podcast, check it out at https://embeddedaipodcast.com/
More episodes of the podcast The Agile Embedded Podcast
Terrible Habits of the Solo Developer
16/12/2025
Agile Hardware Development with Gregor Gross
03/12/2025
Crossover with Embedded AI Podcast
18/11/2025
Zephyr with Luka Mustafa
09/11/2025
Crossover with Mob Mentailty Part 2
21/10/2025
Crossover with Mob Mentality part 1
16/10/2025
Violet Su on hardware manufacturing
08/07/2025
AI-augmented software development
25/06/2025
ZARZA We are Zarza, the prestigious firm behind major projects in information technology.