Skip to content
Tech News
← Back to articles

Adafruit's New CircuitPython 'Turbo' Brings Native Code To Tiny Boards

read original get Adafruit Metro RP2040 Board → more articles
Why This Matters

Adafruit's CircuitPython Turbo brings near-native performance to beginner-friendly microcontroller boards by compiling select Python functions into machine code, dramatically speeding up compute-heavy tasks like fractals, LED effects, and audio processing. This matters because it lowers the barrier for hobbyists and educators to build more responsive, complex embedded projects without abandoning Python's simplicity for C.

Key Takeaways
Worth a Look

Adafruit Metro RP2040 Board — This is one of the exact boards used in Adafruit's CircuitPython Turbo benchmarks, making it a great way to try native-code speedups yourself. It's a solid, beginner-friendly RP2040 board perfect for experimenting with fractals, NeoPixel effects, and sensor processing.

See Adafruit Metro RP2040 Board on Amazon → Affiliate link — we may earn a commission on purchases, at no extra cost to you. Product picked by AI based on this article; it is not a tested recommendation.

Targeting students and beginners, Adafruit released "CircuitPython" in 2017 (as a derivative of the MicroPython microcontroller-optimized programming language).

Now Adafruit managing director Phillip Torrone (also long-time Slashdot reader ptorrone) brings this update:

Adafruit has published CircuitPython Turbo, a workflow that compiles selected Python functions into native machine code on a computer, then loads them onto compatible microcontroller boards.

It builds on MicroPython's Native and Viper emitters. In a documented Metro RP2040 fixed-point Mandelbrot test, Viper cut computation time from 8.335 seconds to 0.423 seconds, a 19.71x speedup over bytecode. The rest of the application stays in Python. The guide includes benchmarks, source code and hardware demos. The speedup is for the measured computation, not the whole application.

"Turbo support is now included in the latest official CircuitPython builds for RP2040 and RP2350 boards..." explains Torrone's announcement at Adafruit.com. "The new Turbo in CircuitPython helps when the board spends time calculating: making neopixel effects, drawing fractals, processing audio, filtering sensor readings, or preparing lots of pixels. Those projects can get smoother animation, quicker responses, or room to do more things at once."

With Turbo, it's easier, better, and now even faster to make LED light up costumes that also reacts to sound at the same time, a sensor dashboard with animated graphics, or a tiny game doing physics while drawing the screen. Turbo speeds up the busy Python parts. It won't make a slow sensor or display connection faster... Your computer turns selected functions into instructions the chip can run directly. Python still handles the rest.

We have measured speedups, real display captures, and examples you can pull apart to see what happened. None of this arrived alone. CircuitPython, MicroPython, PyMCU, compiler tools, open hardware, and people sharing their work gave us pieces to connect. The Bao experiments take that idea somewhere else, handing calculations to four helper cores. Now we get to make those paths easier to use, compare results, and find the next useful thing. Maybe that's smoother animation, a responsive instrument, or an idea we haven't tried yet.

That's what I like about open source. Someone shares a piece, someone else sees a possibility, and we get to keep building it together.

... continue reading