View this email in your browser. Warning: Flashing Imagery
Welcome to the latest Python on Microcontrollers newsletter! On the heels of last week’s release of CircuitPython 8.0.0 alpha, version V1.19 final of MicroPython was released! There are also some projected changes at GitHub, and projects galore noted in this issue.
We’re on Discord, Twitter, and for past newsletters – view them all here. If you’re reading this on the web, subscribe here. Here’s the news this week:
MicroPython 1.19 Released
MicroPython v1.19 was just released! The release has seen a big change to the format of MicroPython’s .mpy files. These files – which contain precompiled bytecode – now contain mostly static data which is ready to execute without any changes (previously a lot of linking steps were required when importing .mpy files). This simplifies things and improves import speed, and most importantly will soon allow you to easily “freeze” precompiled bytecode into a linear filesystem, without needing to rebuild the main firmware. This dynamic freezing feature will be available in a future release.
There are many other enhancements, fixes and additions in v1.19, including a new port to Renesas RA microcontrollers. One neat addition is the ability to customize the REPL prompt (the »> part) by setting sys.ps1 (and sys.ps2) to whatever string you like. This can be very useful to distinguish different boards, by making sys.ps1 unique on each of them. For example “D2> “ on a PYBD-SF2, or “RP> “ on a RP2040-based board – Release Notes, Changelog, Forum Post and Downloads.
Video: Flash MicroPython v1.19 firmware on ESP32-C3
A video tutorial on how to flash MicroPython v1.19 firmware on an ESP32-C3, tested on Espressif ESP32-C3-DevKitM-1 and AI-Thinker NodeMCU ESP-C3-32S-Kit. Both have a single USB connector – YouTube and Embedded Things.
Hackster.io Article on CircuitPython 8.0.0
Hackster.io writes about CircuitPython 8.0.0 – hackster.io.
Shiny New CircuitPython 8.0.0 Alpha Brings New Board Support, Bug Fixes, and More, Offering support for new boards, including Adafruit’s latest ESP32-S2 Feathers, CircuitPython 8.0.0 is ready for testing.
GitHub CEO Discusses Big Changes for Developers
GitHub CEO Thomas Dohmke spoke at WeAreDevelopers recently and shared his thoughts on the big changes ahead for developers – Twitter Thread.
Some of the points:
- “There will be greater change in the next 5 years than in the last 40. We are entering a fundamental transformation of software development as we know it…and I think it will make us all happier.”
- “Whether it’s the AI pair programmer…or the readily available Codespaces for a project that you want to contribute back to – all these things will help you with the things that you don’t want to do, so you can spend more time enjoying the things that you do.”
- “In fact, in files where Copilot is enabled, we are already seeing nearly 40% of the code being suggested by Copilot. In five years, I predict that number will be 80%.”
- “I think the shift to the cloud will happen at such a rapid rate, that in just a few years I predict there will be no more code on your local computer.”
Two Python “Cheat Sheets”
Here are two single page summaries of Python information, sometimes called “cheat sheets”. Such sheets have been rather popular in this newsletter. Here are two new ones: a general Python 3 sheet and a list of Python questions that could come up in interviews. Check the links for higher resolution images of both – General Python 3 Sheet and Interview Sheet.
This Week’s Python Streams
Python on Hardware is all about building a cooperative ecosphere which allows contributions to be valued and to grow knowledge. Below are the streams within the last week focusing on the community.
CircuitPython Deep Dive Stream
This week, Tim streamed work playing with the new web workflow.
You can see the latest video and past videos on the Adafruit YouTube channel under the Deep Dive playlist – YouTube.
John Park’s CircuitPython Parsec this week is on PixelMap – Adafruit Blog and YouTube.
Catch all the episodes in the YouTube playlist.
The CircuitPython Show
The CircuitPython Show is an independent podcast, hosted by Paul Cutler, focusing on the people doing awesome things with CircuitPython. Each episode features Paul in conversation with a guest for a short interview – CircuitPythonShow and Twitter.
The podcast is off this week. It featured Anne Barela last week. Guy Dupont is the guest on the next episode, coming June 27th – Show List.
TammyMakesThings is Streaming CircuitPython
Community member and CircuitPython contributor Tammy Cravit is streaming on Twitch. Her stream focuses on electronics, coding and making, with a focus on CircuitPython. The first few streams have been working on a MacroPad-based MIDI controller, and she’s got lots of other project ideas in the works. An exact schedule for her streams is still being worked out, but she’s targeting 2-3 streams per week. Check it out and follow now to be notified of future streams – Twitch.
Project of the Week: The Cube of Rainbow Torment
Tod Kurt makes an inexpensive, blinky colorful RGB LED cube – Twitter.
The code is in CircuitPython and it’s just barely fast enough to control the 64 * 6 RGB LEDs that make up the cube. The code running above is taken straight out of the Adafruit LED Animations Learn Guide.
News from around the web!
The comfortable, custom PicoSplit keyboard packs two Raspberry Pi Picos and CircuitPython firmware – Hackster.io via Twitter.
Soon my dog will be talking by hitting his paw on a capacitive button… I hope lol. Thanks to a Raspberry Pi 4 and CircuitPython – Twitter.
Tufty 2040 is a hackable, programmable badge with 2.4” (320 x 240) TFT LCD color display, powered by Raspberry Pi RP2040 with MicroPython (and planned CircuitPython) support – Pimoroni.
Adjust an RGB LED matrix brightness without a bunch of manual color changes in the code. A CircuitPython class is used to algorithmically adjust brightness of displayio objects and palettes as well as optional normalization and gamma. Testing on an Adafruit MatrixPortal – Twitter.
RP2040 Dev Board is an open-hardware development board for the RP2040, designed to be an enhanced version of the Pico. MicroPython and CircuitPython compatible – Tindie and GitHub.
A tiny dashboard using a Raspberry Pi Pico and MicroPython, it can present bar, line and point charts and resize, scale and update live data – Twitter.
Weighing a can of cat food with a strain gauge and NAU7802 sensor. This uses an Adafruit Clue board running CircuitPython – Twitter.
Tutorial: Add an OLED display to Raspberry Pi Pico with MicroPython – peppe80.
Program the 7×17 LED matrix on the Pico:ed with CircuitPython – Stefan Draeger via Twitter.
CALM #87 – outils autour de CircuitPython et brèves du moment – YouTube (French).
The Pimoroni Motor 2040 is a quad motor+encoder controller which is perfect for making robots that are small but mean serious business. It’s powered by a Raspberry Pi RP2040 microcontroller. MicroPython support is available with CircuitPython support coming – Pimoroni via Twitter.
How to create a dashboard in Python with Jupyter Notebook – mljar.
Breaking Secure Boot on Google Nest Hub (2nd Gen) to run Ubuntu using a Raspberry Pi Pico loaded with TinyUSB – fred’s notes.
BlueLink is an unofficial Python API wrapper for Hyundai’s Bluelink®. It allows you to remotely control your Hyundai car via Python – GitHub.
Five Levels of Handling Date and Time in Python – Medium.
The Python package pyttsx3 converts text to speech to turn a written book into an audiobook in a few lines of code – Twitter Thread.
Hello, Python is billed as an all-in-one Python resources website that covers articles, papers, conferences, best websites, and video – helloPython.
PyDev of the Week: Jürgen Gmach on Mouse vs Python
#ICYDNCI What was the most popular, most clicked link, in last week’s newsletter? MicroPython Newsletter.
Adafruit STEMMA QT / qwiic hub – Twitter.
We had a request on the forum for a vertical-JST-SH I2C hub. most of our boards have two ports for chaining I2C but there could be a good reason for wanting a star-topology as well, for example reducing voltage droop or to fit in a small enclosure.
CrowPi L is a Raspberry Pi laptop for learning programming and hardware. CrowPi L is a lite version born out of CrowPi2. – CrowPi via Twitter.
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 one new board added:
Note: For non-Adafruit boards, please use the support forums of the board manufacturer for assistance, as Adafruit does not have the hardware to assist in troubleshooting.
Looking to add a new board to CircuitPython? It’s highly encouraged! Adafruit has four guides to help you do so:
New Learn Guides!
Adafruit QT Py ESP32-S3 from Liz Clark
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!
For the latest libraries, download the Adafruit CircuitPython Library Bundle. For the latest community contributed libraries, download the CircuitPython Community Bundle.
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 channels 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 357!
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 have been working for a couple of weeks on CircuitPython hangs that occur on the MatrixPortal when the matrix is in use and there is network activity. I may have found the problem. Updating the RGB matrix is a CPU-intensive activity that runs as a high-priority interrupt routine. The bidirectional SPI startup for each communication with the ESP32 co-processor was not atomic, and I believe a rare but possible delay between starting receive and transmit caused the problem. Making the startups be a single atomic operation seems to fix things.
I also fixed a second bug in the ESP32SPI Python library; my initial fix was not good enough.
This week I’ve been working on a guide walking you through how to make a GitHub profile that is both memorable and representative of you. This guide turned out to be a bit beefier than expected, but so far I’m really happy with the content. The last step is covering a number of tools to help you create beautiful content in various ways. I’ll be updating my profile to show these tools in action. If you’re interested in creating a GitHub profile, or snazzing your current one up a bit, check out this guide when it goes live!
This past week I updated the HT16K33 library so that it supported multiple displays as a single display. This required digging into some low level stuff, but I’m very happy with the results. I will not be around for the next few weeks, so there won’t be new updates for a bit.
This week I made a script that polls Github API to get the actions workflow run status. It will be used for an upcoming guide with a Repository status light. I tested the mpy-cross build process and resulting library file with a new kind of typing syntax in it. I also tried out the beginnings of the web workflow that Scott showed on Show and Tell. I’m tinkering with the pages that it serves trying to make one that allows editing files on the device from the browser.
This week I’ve merged in the auto-WiFi support into CircuitPython. Now when the .env file has an SSID and password set, CircuitPython will auto-connect to the WiFi network. It will also keep that connection across resets. This is useful for the upcoming web workflow that allows for editing files from a web browser or REST API.
After merging the auto-WiFi PR in, I continued work on webserver in CircuitPython. I’ve gotten reading the filesystem working and will continue to work on other pieces of a “workflow”. The BLE workflow has been a good reference because it lays out all of the desired interactions clearly.
I returned this week after being out last week. I started by working on the QT Py ESP32-S3 board guide. It still has a couple of pages that need to be wrapped up, but the bulk of the information is there for folks that want to get started. Huge thanks to Kattni for her help with it- the board guides are very large and require a lot of attention to detail, and as usual, she was extremely helpful answering my many questions that came up along the way.
I’m now switching gears to playing with cassette tapes and strain gauges, though not together. I’m working with JP on some CircuitPython cassette hacking. We’ll be doing a guide showing two different methods on controlling tape players with CircuitPython. For the strain gauge, after doing the new product guide for the NAU7802 STEMMA board, I wanted to try and come up with a project for it. I’m going to be building an IoT pet food tracker where a strain gauge measures the weight of the food left in a container and can track the usage over time and alert you when you need to fill up the container. I was testing with a can of cat food and was able to get an accurate reading in both grams and ounces from the NAU7802’s raw value with CircuitPython.
The next MicroPython Meetup in Melbourne will be on June 22nd via Zoom. Get details and sign up on Meetup. See the slides of the May 25th meeting.
SciPy 2022, the 21st annual Scientific Computing with Python conference, will be held in Austin, Texas, USA from July 11-17, 2022. The annual SciPy Conference brings together attendees from industry, academia, and government to showcase their latest projects, learn from skilled users and developers, and collaborate on code development. The full program will consist of 2 days tutorials (July 11-12), 3 days of talks (July 13-15) and 2 days of developer sprints (July 16-17) – SciPy 2022.
EuroPython 2022 will be held on 11th-17th July 2022 and it will be both in person and virtual. The in-person conference will be held at The Convention Centre Dublin (The CCD) in Dublin, Ireland – EuroPython 2022.
PyOhio is a non-profit annual Python community conference usually held in Columbus, OH. It is being held online starting Saturday, July 30, 2022. It is free to attend and welcomes anyone with an interest in Python. Content ranges from beginner to advanced and is intended to be relevant to all types of Python users: students, software professionals, scientists, hobbyists, and anyone looking to learn more – PyOhio.
Send Your Events In
As for other events, with the COVID pandemic, most in-person events are postponed or held online. If you know of virtual events or events that may occur in the future, please let us know on Twitter with hashtag #CircuitPython or email to cpnews(at)adafruit(dot)com.
CircuitPython’s stable release is 7.3.0 and its unstable release is 8.0.0-alpha.1. New to CircuitPython? Start with our Welcome to CircuitPython Guide.
20220619 is the latest CircuitPython library bundle.
v1.19.1 is the latest MicroPython release. Documentation for it is here.
3.10.5 is the latest Python release. The latest pre-release version is 3.11.0b3.
3,047 Stars Like CircuitPython? Star it on GitHub!
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 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
Programmer – USB / ESP32 – Bit Bang Gaming LLC – Adafruit Jobs Board.
The Adafruit Discord community, where we do all our CircuitPython development in the open, reached over 34,710 humans – thank you! Adafruit believes Discord offers a unique way for Python on hardware folks to connect. Join today at https://adafru.it/discord.
ICYMI – In case you missed it
Python on hardware is the Adafruit Python video-newsletter-podcast! The news comes from the Python community, Discord, Adafruit communities and more and is broadcast on ASK an ENGINEER Wednesdays. The complete Python on Hardware weekly videocast playlist is here. The video podcast is on iTunes, YouTube, IGTV (Instagram TV), and XML.
The 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.
Codecademy “Learn Hardware Programming with CircuitPython”
Codecademy, an online interactive learning platform used by more than 45 million people, has teamed up with Adafruit to create a coding course, “Learn Hardware Programming with CircuitPython”. The course is now available in the Codecademy catalog.
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.
Join the Adafruit Discord or post to the forum if you have questions.