Adafruit's New CircuitPython 'Turbo' Brings Native Code To Tiny Boards
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…
Adafruit has unveiled CircuitPython Turbo, a new feature that brings native code compilation to tiny microcontroller boards. Aimed at students and beginners, this update was released by Adafruit managing director Phillip Torrone. CircuitPython Turbo compiles selected Python functions into native machine code on a computer, which is then loaded onto compatible microcontroller boards.
This process builds upon MicroPython's existing Native and Viper emitters. A benchmark test on the Metro RP2040 board showed a staggering 19.71x speedup in computation time, reducing 8.335 seconds down to just 0.423 seconds.
The Turbo feature is now integrated into the latest official CircuitPython builds for RP2040 and RP2350 boards. It is particularly beneficial for projects that involve calculations, such as making neopixel effects, drawing fractals, processing audio, filtering sensor readings, or preparing numerous pixels. With Turbo, these applications can achieve smoother animation, quicker responses, and increased capacity for simultaneous tasks.
Torrone explains that with CircuitPython Turbo, it's easier, better, and faster to create LED light-up costumes that react to sound, develop sensor dashboards with animated graphics, or build tiny games that feature physics simulations while drawing on the screen. However, it's important to note that Turbo only accelerates the Python parts of the code that are specifically designated for compilation. It does not expedite slow sensor or display connections.
This development is a testament to the power of open-source collaboration, where pieces from various projects such as CircuitPython, MicroPython, PyMCU, compiler tools, open hardware, and community contributions come together to create something truly useful. The author expresses enthusiasm for the possibilities that open-source platforms enable, as each shared piece of code or idea can lead to new discoveries and improvements.
Written by urgent.news from Slashdot's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.