Refunds Shipping

We use some essential cookies to make our website work.

We use optional cookies, as detailed in our cookie policy, to remember your settings and understand how you use our website.

CircuitPython 4.1.0 Review

By Ben Everard. Posted

This article was originally published as part of HackSpace magazine, which has since been incorporated into Raspberry Pi Official Magazine.

CircuitPython 4.1.0 Review

The big feature of the free software, CircuitPython 4.1. is the speed. You can see the box below for more information on the benchmarks we ran but, in short, the new version is quite a bit quicker.

Basic operations, such as floating point and integer arithmetic, were about twice as fast, and it was particularly interesting to see that this performance improvement filtered all the way through to the devices controlled by the board.

We were able to flash NeoPixels at twice the rate using this firmware – we’re particularly pleased to see this, as we’ve run into performance issues running NeoPixel matrixes with CircuitPython in the past.

There are also big performance gains when controlling screens.

While the software has been moving along, so too has hardware support, and there’s now a greater range of supported hardware than ever before.

At the time of writing, there were 62 separate devices on the circuitpython.org downloads page, so there’s a great selection to choose from, if you want to get developing with this language.

Advertisement

A quick into to Python – short scripts, rapid results

or free PDF for contributors

Ultimately, CircuitPython is never going to match the speed of a compiled language. The overheads of running an interpreter on a microcontroller are just too great.

However, most of the time, we’re using microcontrollers that are more powerful than we need, and these machines spend a significant proportion of their time waiting for things to happen.

Our code, then, just needs to be ‘fast enough’.

Earlier versions of CircuitPython were fast enough for some tasks, but it was quite common to hit issues – particularly when working with outputs such as LEDs and screens.

This new version means that there are even more areas that you can work with using CircuitPython.

We ran the same tests on a Circuit Playground Express, using both CircuitPython 4.0.1 and 4.1.0. These are the results (lower is better).

Verdict: 10 out of 10

Instantly double the speed of your microcontrollers? Yes please!

Ben Everard photo

Ben is the Editor of HackSpace magazine. When not wrangling words, he enjoys cycling, gardening, and attempting to identify wild mushrooms.

Subscribe to Raspberry Pi Official Magazine

Save up to 37% off the cover price and get a FREE Raspberry Pi Pico 2 W with a subscription to Raspberry Pi Official Magazine.

Subscribe