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,868 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! Catch us on Discord, Twitter, and for past newsletters – view them all here. If you’re reading this on the web, subscribe here. Now for all the news:
CircuitPython 7.0.0 Alpha 3 and 6.3.0 Stable Released!
CircuitPython 6.3.0 is the latest minor revision of CircuitPython and is a new stable release. Notable changes since 6.2.0 include many new boards, many corrections to existing boards, and the addition of a consistent board.LED to most boards – Adafruit Blog and GitHub Release Notes.
CircuitPython 7.0.0-alpha.3 is an alpha release for CircuitPython 7.0.0. It is relatively stable, but contains a number of issues still to be addressed for 7.0.0. The Python API’s it presents may change. Notable additions to 7.0.0 include run-time customization of USB devices, merging in of MicroPython fixes and enhancements as of MicroPython 1.15, simplifications to the RGB status LED codes, and a clocking fix for a few samples of RP2040 boards – Adafruit Blog and GitHub Release Notes.
Raspberry Pi update: RP2040 single chips going on sale now for $1
On Tuesday June 1st, the Raspberry Pi Foundation announced that RP2040 microcontroller chips are available from their Approved Reseller partners in single-unit quantities, allowing people to build their own projects and products on Raspberry Silicon – Raspberry Pi Blog.
pyRTOS: a real-time operating system (RTOS) for CircuitPython
Adafruit switching default branch of CircuitPython repositories from master to main
Over the course of the next few weeks, Adafruit is switching the CircuitPython repositories to use main as their default branch instead of master. This change is a continuation of past efforts to depart from language deeply rooted in centuries of racism and the subjugation of people based on the color of their skin towards language that is inclusive of everyone. These changes have sparked others in the electronic and maker communities (SparkFun, Make, and more) to think about the history of words, how they are used, and changes we can make together – Adafruit Blog.
Q&A with Programming with Microcontrollers in CircuitPython author Armstrong Subero
Apress recently published the book Programming Microcontrollers in CircuitPython. Adafruit asked author Armstrong Subero some questions about both he and the book (and had Armstrong on SHOW AND TELL too!) – Adafruit Blog.
CircuitPython Deep Dive Stream with Scott Shawcroft
This week, Scott chats with John Park, answers questions, and fixes the BLE workflow.
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!
The PyCon US 2021 recordings are available on their YouTube channel – PyCon US Blog.
NeoKey 2 FeatherWing brings a pair of mechanical key switches with NeoPixel under-lighting to the bongo cat party on John Park’s JP’s Product Pick of the Week show. CircuitPython makes it simple to code USB HID and MIDI on the Feather RP2040 used here – Twitter.
A 3D printed MULTI PASS direct from the movie The Fifth Element, made with an Adafruit QT Py and programmed in CircuitPython – Twitter.
A small list of tips and tricks when working with CircuitPython – GitHub.
MagTag Space weather display, a fairly simple MagTag app that grabs Space Weather from NOAA – GitHub.
How to Build a Raspberry Pi Pico-Powered Camera Button – use a Pico and a button programmed in CircuitPython to fire a phone’s camera from a distance – Tom’s Hardware.
Programming languages: why Python 4.0 might never arrive, according to its creator. Python programming language creator Guido van Rossum said it was “almost taboo to talk about a Python 4 in a serious sense” following the troubled migration from Python 2.0 to Python 3.0 – TechRepublic.
A more compact and universal
colorwheel (some CircuitPython boards have
neopixel contains reference to an appropriate one! Here is super simple rainbow code for boards with
board.NEOPIXEL. Thanks to @kattni – Twitter.
Joey Castillo has developed a version of the Open Book using the Raspberry Pi Pico instead of a Feather, named the Open Book Abridged Edition – Twitter.
A robot named Waiti – a CircuitPython version is in the works – Twitter.
Using CircuitPython running on a Raspberry Pi to verify CircuitPython running on the RP2040 Stamp – Twitter.
Last night I was playing with CircuitPython (having only used MicroPython so far) on the Pimoroni Pico Explorer. Having fun with the UI Lib, I got a bouncing ball with a button to add to the X. Not many steps to a tennis game… – Twitter.
TinyTuya – a Python module to interface with Tuya WiFi smart devices – GitHub.
PyTCP is an attempt to create fully functional TCP/IP stack in Python. It supports TCP stream based transport with reliable packet delivery based on sliding window mechanism and basic congestion control. It also supports IPv6/ICMPv6 protocols with SLAAC address configuration – GitHub.
Remote Controlling a Nintendo Switch with Python – Ari Codes.
Bendy Boards from Geek Mom Projects demonstrate a functional articulated PCB chain including NeoPixel LEDs! – hackster.io.
Edublocks, a block based programming environment for electronics that includes Python, now has the ability to accept language translations – Twitter.
Bulb is another teeny-tiny interpreted language that runs on SCHIP, taking up a good bit less than 4kb of RAM – Internet Janitor.
PyDev of the Week: Fernando Masanori from Mouse vs Python
#ICYDNCI What was the most popular, most clicked link, in last week’s newsletter? Python on hardware in Gartner Embedded Software and Systems report.
Adafruit Macropad RP2040 bring-up test – Twitter.
We put together our hopefully-final prototypes for the Macropad we’re working on at the office. Now we’re home and it’s time to bring up the design. We like to do our bring-ups in Arduino, so we’re using the Philhower Arduino core to make a definition and verify all the hardware works. The new part here is the OLED, which uses a new chipset, but similar enough to other OLEDs we wrote a driver pretty fast. This test program lights up all the switch NeoPixels tracks the rotary encoder direction and pushbutton, and scans I2C connected to the Stemma QT port. So far so good!
Macropad RP2040 bring-up part deux – CircuitPython time – Twitter.
Now that we have my hardware validated in Arduino, it’s time to get it running in CircuitPython as well. We needed to write a little patch to the core to fix a row/col swap so that the SH1106 driver will work right, however, once we got that fixed, the display/buttons/encoder are working perfectly. Next up, maybe we can get the onboard audio working so that the final PCBs can be ordered.
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, there were four new boards 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!
CircuitPython Project Bundle
When you get to the CircuitPython code section of an Adafruit Learn Guide, sometimes things can get a bit complicated. You not only have the code you need to upload to your device, but you likely also need to add some libraries that the code requires to run. This involved downloading all the libraries, digging through to find the ones you need, and copying them to your device. That was only the beginning on some projects, as those that include images and/or sound files required further downloading and copying of files. But, not anymore!
Now, with Project Bundles, you can download all the necessary code, libraries and, if needed, asset files with one click! We automatically check which libraries are required for the project and bundle them up for you. No more digging through a huge list of libraries to find the ones you need, or fiddling with looking for other files or dependencies. Download the Project Bundle, copy the contents to your device, and your code will simply work. We wanted to make this the easiest way to get a project working, regardless of whether you’re a beginner or an expert. We’ll also be adding this feature to popular IDEs as an add-on. Try it out with any Circuit Python guide on the Adafruit Learning System. Just look for the ‘Download Project Bundle’ button on the code page.
To download and use a Project Bundle:
In the Learning System – above any embedded code in a guide in the Adafruit Learn System, you’ll find a Download Project Bundle button.
Click the button to download the Project Bundle zip.
Open the Project Bundle zip to find the example code, all necessary libraries, and, if available, any images, sounds, etc.
Simply copy all the files over to your CIRCUITPY drive, and you’re ready to go!
If you run into any problems or bugs, or would like to submit feedback, please file an issue on the Adafruit Learning System Guides GitHub repo.
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 318!
Here’s this week’s new CircuitPython libraries:
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 made the CircuitPython 6.3.0 final release this week, and I’m working on the first 7.0.0 alpha release that will be visible on circuitpython.org.
I’m continuing to work on a native module for keypad scanning in CircuitPython: We plan to support, one pin per key, matrix keypads, and shift-register-driven matrices.
I’ve fixed several bugs in the new customized HID device support. A user has found that there are complicated HID devices with multiple report ID’s, and we’ve worked out a way to support those, so the API will change slightly.
I’ve continued working on the camera code on ESP32-S2, but it doesn’t work yet. CircuitPython is able to capture data from the camera, but it’s not the right data, as though the synchronization signals are being lost or ignored.
With the help of a community member, the
mpy-cross program can now be built natively for M1 macs, and we provide a pre-built binary if for any reason you want to create mpy files on your M1 mac without building all of CircuitPython. (This applies to the development version of CircuitPython only. For 6.x, you should still be able to use the x86_64 version on your M1 mac, it’s just emulated by Rosetta 2)
I also added some scripts to our Github Actions that make sure that specific boards can be built on a Windows system with the MSYS2 build environment. We have relatively few developers & community members who are building on Windows (most use Mac or Linux, including using WSL within Windows), so it has been easy in the past to introduce problems with building CircuitPython that would not be noticed until an inconvenient moment.
This week I published the Rotary Trinkey guide. It has everything you need to get started with your Rotary Trinkey including a number of CircuitPython and Arduino examples, such as: control a NeoPixel, create a volume knob, or advance through YouTube videos frame-by-frame. Rotary Trinkey is a great little board. If any of those things or more sound interesting to you, pick one up!
We’ve begun moving all of the CircuitPython library repositories on GitHub from
main as the default branch. This is another step towards using more inclusive language in tech. We’ve written a blog post with some details.
This change will affect those folks who contribute to the Adafruit CircuitPython libraries. You will need to make sure that you’re working with the
main branch instead of the
master branch when you are working on library code or documentation. If you are planning on getting started contributing, we recommend starting fresh with a new clone of the repository to ensure that you have the latest updates. The Contribute to CircuitPython with Git and GitHub guide shows how to tell whether or not a library has been updated to
main. Be aware that we are deleting the
master branch in this process, so if you are trying to push to or sync with
master, it will fail – this is deliberate as we do not want folks to be confused moving forward about which branch is the active one.
This past week, I have been working on guide updates. One of the guides that gave me a little more trouble than the rest was the Raspberry Pi E-Ink Event Calendar using Python guide because Google had completely changed the setup process on their end. I went through and updated it with many screenshots to make sure it was easy to follow along.
This week I’ve continued working on BLE workflow. Bringing the protocol into the core has exposed some timing aspects that weren’t apparent in the prototype implementation. So, I’ve had to make the test version more robust as well as fixing internal issues. All of this testing has also highlighted missing pieces of our internal Bluetooth support around reconnecting to a device we already know about. This will be done when CircuitPython does a soft reload, so it’s important to get it reliable. When done right, it should also mean that the CP device cannot be connected to by anyone unless you put it in a discoverable mode specifically. This is the piece we missed in our previous work on BLE and will make it possible to ship it in stable versions of CircuitPython. It’s important work, just in the weeds a bit. Check out my Deep Dive streams for details around this work.
EuroPython, the largest conference for the Python programming language in Europe, will be held online July 26 – August 1, 2021. More information at https://ep2021.europython.eu/
Call for proposals for PyConline AU 2021 runs until June 10th, 2021 with the event held 10-12 September, 2021 – pyconlineau
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.
20210606 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, Micro Center, Raspberry Pi and more.
Job of the Week
Hardware Engineer – HeadSpin Inc. – Adafruit Jobs Board.
The Adafruit Discord community, where we do all our CircuitPython development in the open, reached over 29,463 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.