If you missed Tuesday’s Python on Microcontrollers Newsletter, here is the ICYMI (in case you missed it) version.
To never miss another issue, subscribe now! – You’ll get one terrific newsletter each Tuesday (before this post). Over 8,770 subscribers worldwide!
The next newsletter goes out in a week and being subscribed the best way to keep up with all things Python for hardware. No spam, no selling lists, leave any time.
Welcome to the latest Python on Microcontrollers newsletter, brought you by the community! We’re on Discord, Twitter, and for past newsletters – view them all here. If you’re reading this on the web, subscribe here. Let’s get started!
Linux 30th Anniversary!
Python Software Foundation Membership Drive
From the Python Software Foundation: “As we celebrate the PSF’s 20th and Python’s 30th anniversaries, we want to welcome everyone to become a PSF member. It’s important to us to have a membership that reflects our community. Everyone who uses and supports Python is invited to join us…” There are multiple membership levels available. The membership drive ends March 21, 2021. More – Python.org.
CircuitPython Deep Dive Stream with Scott Shawcroft
This week, Scott streams his work on iMX RT flash.
You can see the latest video and past videos on the Adafruit YouTube channel under the Deep Dive playlist – YouTube.
News from around the web!
Experience the joy of receiving your first radio signal with the ScoutMakes Bluetooth FM Radio Kit – Tindie.
Emulate, read, write, and communicate between NFC devices with Electronic Cats’ Hunter Cat NFC board – Hackster.
Create a low-res thermal camera with a Raspberry Pi Pico, an AMG8833 sensor and an ILI9341 screen with CircuitPython – Recantha.
These low cost “Black Pill” STM32F411 boards are a lovely upgrade to the STM32F401. With 512KB of flash and 128KB of RAM, this board has lots of GPIO for projects. And now you can use it without a toolchain or IDE setup – all by installing CircuitPython! Here we loaded the CircuitPython build on with STM32Cube and with a few lines of code have an OLED screen showing the REPL – YouTube and Adafruit.
Upgrade your AirLift firmware with your RP2040 using serial passthrough – Adafruit Learn System.
Getting started with Raspberry Pi Pico, CircuitPython and the MCP3304 (Japanese) – Qiita.com.
Using an SPI connected TFT display with Raspberry Pi Pico and CircuitPython (Japanese) – Qiita.com.
Using Raspberry Pi and a Python Server to send an image to an ESP32/MicroPython Client via WiFi TCP socket – Blogspot.
How to install Python – YouTube.
Using a button to control an LED using Raspberry Pi Pico and MicroPython (Chinese) – Blogspot.
Python Program To Implement Binary Search Tree Program 2: Insertion – YouTube.
Save your Python project as an executable file – Medium.
What is Python used for? – Medium.
Python tuples explained – YouTube.
A little hot swap PCB for testing switches using the Adafruit QT Py or the Seeed Studio Xiao (and thanks to @CircuitPython can be used as a single key macro pad too) – Twitter.
Converted code running on a Raspberry Pi Pico using CircuitPython and NeilRedRobotics Pico to Zero adapter for the interfacing duties – Twitter.
Discovering the CircuitPython gamepad module to keep track of button presses for an arcade controller – Twitter.
The ATMega Zero ESP32-S2 prototypes arrived – Twitter.
A Pimoroni Four Letter PHat, ATMegaZero RTC shield and the new ATMegaZero ESP32-S2 microcontroller running CircuitPython – Twitter.
Custom keypad with RGB arcade buttons, Pimoroni RGB rotary encoder, Raspberry Pi Pico and CircuitPython – Twitter.
Using a Raspberry Pi Pico, an MPU-6050 and CircuitPython to use gesture to control a video game – Tom’s Hardware.
A new nixie tube clock called the IV3 Clock, which builds on previous designs and is now available in a black and gold edition finish – Geeky-Gadgets.
Three kid-friendly CircuitPython projects that make use of the NOAA databases – Southern Fried Science.
MorphESP 240 ESP32-S2 CircuitPython-compatible dev board – Geeky Gadgets.
Raspberry Pi Pico: 10 project ideas featuring the Grove shield – Seeed Studio.
Mu Editor now supports micro:bit v2 – Codewith.mu.
It is now possible to flash a MicroPython program to the micro:bit v2 via Bluetooth. Sign up to test the beta via the Play store listing – Google.
KiKit is a Python library and CLI tool to automate several tasks in a standard KiCAD workflow – GitHub.
PyWebIO provides a series of imperative functions to obtain user input and output on the browser, turning the browser into a “rich text terminal” – GitHub.
The Python Package Index is now a GitHub secret scanning integrator – GitHub.
Tensorflow Lite for microcontrollers in Micropython – GitHub.
Python-powered live energy monitor for P1 enabled electricity meter – frederickvandenbosch.
Solving ‘Greater-than sudoku’ with python and z3 – ca.rstenpresser.de.
Build an Asteroids Game With Python and Pygame – Real Python.
3/27/21 Stream from CircuitPythonista FoamyGuy (Tim) covers work on Tiled game map files with CircuitPython- YouTube.
Instructables Contest Notifier on MagTag, PyPortal, and Matrix Portal – Instructables.
PyDev of the Week: Yuxi (Hayden) Liu from Mouse vs Python
Rotary Encoder + Trinket M0 + USB Key PCB = Rotary Trinkey. Running a SAMD21E18, this tiny CircuitPython/Arduino USB key-type PCB only does one thing: connect a rotary encoder over USB. And that’s what this does. – Twitter.
We’re playing around, testing things on the upcoming Metro M7. This time we’re doing a TFT shield demo to test out displayio and our ILI9341 driver. We made a fun bouncing DVD demo with transparent pixels. Our code allows a dynamic number of DVD logos for bouncing pleasure. Mostly this is us seeing how a 500 MHz processor feels with CircuitPython! Still lots to do, but this code is working pretty well, no crashing. – YouTube.
New Boards Supported by CircuitPython
The number of supported microcontrollers and Single Board Computers (SBC) grows every week. This section outlines which boards have been included in CircuitPython or added to CircuitPython.org.
This week we had one new board added!
Looking to add a new board to CircuitPython? It’s highly encouraged! Adafruit has four guides to help you do so:
- How to Add a New Board to CircuitPython
- How to add a New Board to the circuitpython.org website
- Adding a Single Board Computer to PlatformDetect for Blinka
- Adding a Single Board Computer to Blinka
New Learn Guides!
Updated Learn Guides!
CircuitPython support for hardware continues to grow. We are adding support for new sensors and breakouts all the time, as well as improving on the drivers we already have. As we add more libraries and update current ones, you can keep up with all the changes right here!
If you’d like to contribute, CircuitPython libraries are a great place to start. Have an idea for a new driver? File an issue on CircuitPython! Have you written a library you’d like to make available? Submit it to the CircuitPython Community Bundle. Interested in helping with current libraries? Check out the CircuitPython.org Contributing page. We’ve included open pull requests and issues from the libraries, and details about repo-level issues that need to be addressed. We have a guide on contributing to CircuitPython with Git and Github if you need help getting started. You can also find us in the #circuitpython channel on the Adafruit Discord.
You can check out this list of all the Adafruit CircuitPython libraries and drivers available.
The current number of CircuitPython libraries is 307!
Here’s this week’s updated CircuitPython libraries:
What’s the team up to this week?
What is the team up to this week? Let’s check in!
I released CircuitPython 6.2.0-beta.4 on March 18. This version is close to what we want in the final 6.2.0. There are few more fixes we’d like to get in, but the next release is likely to be a release candidate.
When we make releases, we reorder the boards on circuitpython.org in order of most frequently downloaded. We’ve been doing this in only a semi-automated way: the process includes downloading tens or hundreds of thousands of log files from Amazon S3, and then running a script. I explored some other services available on Amazon Web Services, and found that I could enable fancier logging and then run SQL queries against those logs directly on AWS. I have experimented with this and it’s working well. This is very far afield from embedded programming but is an interesting diversion for me.
Work continues on support for the i.MX series of microcontrollers, which will be in the upcoming Metro M7 RT1011 board.
Right now I’m concentrating on the SPI peripheral. The next enhancement I’ll work on is to use “DMA” to speed up busio.SPI. Without this, there are long delays between each byte of data that greatly limit the total throughput and which can also make displayio update slowly.
Logic analyzer capture of the SCK line showing a multi-microsecond pause between bytes:
This week I published the Python for Microcontrollers newsletter for the first time without Anne’s excellent assistance. She trained me up over the past few weeks, and helped a lot with content for the recent newsletter. This newsletter is my first one completely solo. I hope I have managed to keep it up to expectations!
In product-guide-land, I published the Adafruit CYBERDECK Hat and Bonnet guide and the Adafruit MIDI FeatherWing guide this week, though the FeatherWing guide was done up a while ago. If you’re looking to get started with either product, check out these guides for details.
Otherwise, I’m continuing to work on creating templates for the CircuitPython Essentials guide so we can include them in the CircuitPython-compatible microcontroller guides and have a much smoother, more tailored experience for folks who are getting started with CircuitPython. I have two templates completed, and am working on a third. None of the CircuitPython template pages are published yet, so I don’t have an example for you. I will soon!
This past week I finally pinned down and made a big todo list of the remaining issues I was having with the low power module, including a couple redundant parts of the API, issues with how reset impacts write protection on the STM32’s clock, and conflicts within how CircuitPython decides whether it will enter “real” deep sleep (the true low power mode) and “fake” deep sleep (where it avoids disconnecting from USB).
I also reviewed incoming modules for low power on NRF, AudioPWMIO, and some miscellaneous bugfixes to UDP sockets and the SPI sharing system used on the Meowbit. I’m hoping I’ll be all through the current NRF/STM32 sleep projects this week, so I can start work on RP2040 sleep – having these three ports, plus the ESP32-S2, should be a good foundation for our next major version.
This week, I got familiar with the inner workings of the bundle releases and made a 2-part dynamic bundler. First I added some code that generates a JSON file that contains all of the information in the Bundle. It is currently being attached as part of a release. This includes all of the dependency information.
One of the issues I ran into was a Cross-Origin Resource Sharing policy limitation. The problem is when trying to download GitHub release assets, it doesn’t like it if the domains don’t match, even if using GitHub pages. I was temporarily able to work around this by using a CORS proxy, but this isn’t a good long term solution. I am currently looking into more reliable methods such as using Amazon S3.
This week I wrapped up the RP2040 flash settings changes. Overall, I’m really happy with how it turned out. I’m wrapping up RP2040 work this week by looking at a couple bugs and then will be moving to iMX RT briefly to bring the flash config there as well. It’s forcing a bit more of an expansion because both CircuitPython and TinyUF2 have the iMX RT flash config in it.
After that, I’ll be moving to nRF work for BLE workflow and collaborating with Trevor who will be doing the iOS side. I’m very excited to start on it but a bit daunted by all the work I want to do. It’ll be nice to work with someone else to help focus where to start.
The 2021 Open Hardware summit will be held online, Friday April 9, 2021. The summit will be livestreamed, but ticket holders will have access to additional interactive portions of the summit like meet-and-greets, workshops, and sponsor booths. Find details, including ticket and sponsorship information at 2021.oshwa.org – OSHWA.
The online GeoPython conference is focused on Python and Geo, its toolkits and applications. April 22-23, 2021 – https://2021.geopython.net/.
PyCon US, the annual official annual Python gathering, has been announced to be held online May 12-15, 2021. Sprints will be held May 16-18, 2021. More information and signups at https://us.pycon.org/2021/
EuroPython, the largest conference for the Python programming language in Europe, has been announced to be held online July 26 – August 1, 2021. More information at https://ep2021.europython.eu/
Send Your Events In
As for other events, with the COVID pandemic, most in-person events are postponed or cancelled. If you know of virtual events or events that may occur in the future, please let us know on Discord or on Twitter with hashtag #CircuitPython.
20210329 is the latest CircuitPython library bundle.
Call for help – Translating CircuitPython is now easier than ever!
One important feature of CircuitPython is translated control and error messages.
With the help of fellow open source project Weblate, we’re making it even easier to add or improve translations.
Sign in with an existing account such as GitHub, Google or Facebook and start contributing through a simple web interface. No forks or pull requests needed!
As always, if you run into trouble join us on Discord, we’re here to help.
jobs.adafruit.com – Find a dream job, find great candidates!
jobs.adafruit.com has returned and folks are posting their skills (including CircuitPython) and companies are looking for talented makers to join their companies – from Digi-Key, to Hackaday, Microcenter, Raspberry Pi and more.
Job of the Week
Makerspace STEAM Instructor – MacInspires Makerspace is searching for STEAM teachers for grades 1-5 to work in their Chelsea, Manhattan and Mamaroneck, New York locations – Adafruit Jobs Board.
The Adafruit Discord community, where we do all our CircuitPython development in the open, reached over 28301 humans, thank you! Adafruit believes Discord offers a unique way for CircuitPython folks to connect. Join today at https://adafru.it/discord.
ICYMI – In case you missed it
The wonderful world of Python on hardware! This is our Python video-newsletter-podcast! The news comes from the Python community, Discord, Adafruit communities and more and is reviewed on ASK an ENGINEER Wednesdays. The complete Python on Hardware weekly videocast playlist is here.
Weekly community chat on Adafruit Discord server CircuitPython channel – Audio / Podcast edition – Audio from the Discord chat space for CircuitPython, meetings are usually Mondays at 2pm ET, this is the audio version on iTunes, Pocket Casts, Spotify, and XML feed.
And lastly, we are working up a one-spot destination for all things podcast-able here – podcasts.adafruit.com
The CircuitPython Weekly Newsletter is a CircuitPython community-run newsletter emailed every Tuesday. The complete archives are here. It highlights the latest CircuitPython related news from around the web including Python and MicroPython developments. To contribute, edit next week’s draft on GitHub and submit a pull request with the changes. You may also tag your information on Twitter with #CircuitPython.