Issue 21 HackSpace magazine: CircuitPython storage: Save data to the flash drive for later retrieval by @ben_everard @HackSpaceMag @circuitpython @adafruit


CircuitPython storage: Save data to the flash drive for later retrieval by Ben Everard –

While investigating the performance of the latest CircuitPython release, we wrote a program to perform some benchmarks and then save the results to the storage so that it can be read by the computer the next time that the device is plugged in. Flash different versions of CircuitPython to the board and, voilà, we had all our benchmarks in one handy place.

Read more in Issue 21, HackSpace Magazine (PDF page 86). Full code here:


A speedier CircuitPython gets 10 out of 10 in the latest issue of HackSpace Magazine via Twitter

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 downloads page, so there’s a great selection to choose from, if you want to get developing with this language.

Read the review in Issue 21 – HackSpace Magazine (PDF, page 128).

Download 4.1.0-rc.0 from and try it today!

Adafruit 2019 2244

We are 100% focused on ease of use, being able to do more in minutes. CircuitPython is a programming language designed to simplify experimenting and learning to code on low-cost microcontroller boards. It makes getting started easier than ever with no upfront desktop downloads needed. Once you get your board set up, open any text editor, and get started editing code. It’s that simple.

Quick and Easy
Create a file, edit your code, save the file, and it runs immediately. There is no compiling, no downloading and no uploading needed.

Beginner Friendly
CircuitPython is designed with education in mind. It’s easy to start learning how to code and you get immediate feedback from the board.

Easy Code Updates
Since your code lives on the disk drive, you can edit it whenever you like, you can also keep multiple files around for easy experimentation.

Serial Console + REPL
These allow for live feedback from your code and interactive programming.

File Storage
The internal storage for CircuitPython makes it great for data-logging, playing audio clips, and otherwise interacting with files.

Strong Hardware Support
There are many libraries and drivers for sensors, breakout boards and other external components.

However it’s also nice that there are significant speed increases too 🙂

Adafruit 2019 2245

Here is the script used and some additional results!

## pyportal 4.1.0-beta.1, ATSAMD51J20
neopixel flicker,4-1-0, 2.951
neopixel rainbow,4-1-0, 2.851
GPIO on/off benchmark,4-1-0, 2.548
integer sum,4-1-0, 3.807
integer multi,4-1-0, 4.901
float sum,4-1-0, 2.48401
float multi,4-1-0, 2.45599
float divide multi,4-1-0, 2.521

## hallowing 4.1.0-beta.1, ATSAMD21G18
neopixel flicker,4-1-0, 12.074
neopixel rainbow,4-1-0, 10.607
GPIO on/off benchmark,4-1-0, 9.71704
integer sum,4-1-0, 17.857
integer multi,4-1-0, 23.038
float sum,4-1-0, 12.553
float multi,4-1-0, 12.642
float divide multi,4-1-0, 13.448

## BONUS STAT… here is 4.0.0 before the optimizations we have now for the pyportal…
neopixel flicker,4-0-0, 5.35
neopixel rainbow,4-0-0, 5.377
GPIO on/off benchmark,4-0-0, 6.21101
integer sum,4-0-0, 7.544
integer multi,4-0-0, 8.603
float sum,4-0-0, 6.173
float multi,4-0-0, 6.15599
float divide multi,4-0-0, 6.16599

## pyportal 4.1.0-beta.1 vs pyportal 4.0.0
neopixel flicker,4-1-0, 2.951 vs 5.35 = 1.8 times faster
neopixel rainbow,4-1-0, 2.851 vs 5.377 = 1.9 times faster
GPIO on/off benchmark,4-1-0, 2.548 vs 6.21101 = 2.4 times faster
integer sum,4-1-0, 3.807 vs 7.544 = 1.9 times faster
integer multi,4-1-0, 4.901 vs 8.603 = 1.8 times faster
float sum,4-1-0, 2.48401 vs 6.173 = 2.5 times faster
float multi,4-1-0, 2.45599 vs 6.15599 = 2.5 times faster
float divide multi,4-1-0, 2.521 vs 6.16599 = 2.4 times faster

Adafruit publishes a wide range of writing and video content, including interviews and reporting on the maker market and the wider technology world. Our standards page is intended as a guide to best practices that Adafruit uses, as well as an outline of the ethical standards Adafruit aspires to. While Adafruit is not an independent journalistic institution, Adafruit strives to be a fair, informative, and positive voice within the community – check it out here:

Join Adafruit on Mastodon

Adafruit is on Mastodon, join in!

Stop breadboarding and soldering – start making immediately! Adafruit’s Circuit Playground is jam-packed with LEDs, sensors, buttons, alligator clip pads and more. Build projects with Circuit Playground in a few minutes with the drag-and-drop MakeCode programming site, learn computer science using the CS Discoveries class on, jump into CircuitPython to learn Python and hardware together, TinyGO, or even use the Arduino IDE. Circuit Playground Express is the newest and best Circuit Playground board, with support for CircuitPython, MakeCode, and Arduino. It has a powerful processor, 10 NeoPixels, mini speaker, InfraRed receive and transmit, two buttons, a switch, 14 alligator clip pads, and lots of sensors: capacitive touch, IR proximity, temperature, light, motion and sound. A whole wide world of electronics and coding is waiting for you, and it fits in the palm of your hand.

Have an amazing project to share? The Electronics Show and Tell is every Wednesday at 7pm ET! To join, head over to YouTube and check out the show’s live chat – we’ll post the link there.

Join us every Wednesday night at 8pm ET for Ask an Engineer!

Join over 36,000+ makers on Adafruit’s Discord channels and be part of the community!

CircuitPython – The easiest way to program microcontrollers –

Maker Business — “Packaging” chips in the US

Wearables — Enclosures help fight body humidity in costumes

Electronics — Transformers: More than meets the eye!

Python for Microcontrollers — Python on Microcontrollers Newsletter: Silicon Labs introduces CircuitPython support, and more! #CircuitPython #Python #micropython @ThePSF @Raspberry_Pi

Adafruit IoT Monthly — Guardian Robot, Weather-wise Umbrella Stand, and more!

Microsoft MakeCode — MakeCode Thank You!

EYE on NPI — Maxim’s Himalaya uSLIC Step-Down Power Module #EyeOnNPI @maximintegrated @digikey

New Products – Adafruit Industries – Makers, hackers, artists, designers and engineers! — #NewProds 7/19/23 Feat. Adafruit Matrix Portal S3 CircuitPython Powered Internet Display!

Get the only spam-free daily newsletter about wearables, running a "maker business", electronic tips and more! Subscribe at !

No Comments

No comments yet.

Sorry, the comment form is closed at this time.