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: hsmag.cc/DxIsRz
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 circuitpython.org 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 circuitpython.org/downloads and try it today!
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 🙂
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