Adafruit Releases CircuitPython Turbo for RP2040 and RP2350 Boards
Adafruit has published CircuitPython Turbo, a workflow that compiles selected Python functions into native machine code for microcontroller boards. A Metro RP2040 Mandelbrot test showed a 19.71x speedup over bytecode, while the rest of the application remains in Python.
CircuitPython was released by Adafruit in 2017 as a derivative of MicroPython, the microcontroller-optimized programming language, and was aimed at students and beginners. The Turbo workflow builds on MicroPython's Native and Viper emitters. In a documented Metro RP2040 fixed-point Mandelbrot test, Viper reduced computation time from 8.335 seconds to 0.423 seconds, a 19.71x speedup over bytecode. The rest of the application stays in Python.
Adafruit managing director Phillip Torrone, also a long-time Slashdot reader known as ptorrone, described the feature in an announcement at Adafruit.com. He said Turbo helps when a board spends time calculating, such as making NeoPixel effects, drawing fractals, processing audio, filtering sensor readings, or preparing many pixels. Those projects can get smoother animation, quicker responses, or room to do more things at once, he said.
Torrone listed LED costumes that react to sound, animated sensor dashboards, and small games that run physics while drawing the screen as examples that become easier, better and faster with Turbo. The speedup applies to the busy Python parts, not to every part of an application. According to the announcement, Turbo will not make a slow sensor or display connection faster. The computer turns selected functions into instructions the chip can run directly, while Python still handles the rest.
The guide published with CircuitPython Turbo includes benchmarks, source code, hardware demos, real display captures and examples that users can examine. Torrone wrote that the work connects pieces from CircuitPython, MicroPython, PyMCU, compiler tools, open hardware and people sharing their work. He also mentioned the Bao experiments, which hand calculations to four helper cores, as another path for handling computation. He said the next steps are to make those paths easier to use, compare results and find the next useful thing, such as smoother animation, a responsive instrument or an idea not yet tried. He added that the work reflects how open source progresses: someone shares a piece, someone else sees a possibility, and people keep building together.