View this email in your browser. Warning: Flashing Imagery
Welcome to this week’s Python on Microcontrollers newsletter! Lots of last minute news this week. CircuitPython 8.0.0 beta 3 released with a beta 4 certain for fixing C3 builds broken by a C compiler default change. Mainline Python (CPython) 3.11 was released yesterday, introducing a trend in better error messages. More Halloween-style builds are highlighted and many projects plus news from around the web. I hope you enjoy this issue – Ed.
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:
CircuitPython 8.0.0 Beta 3 Released
Developers have released CircuitPython 8.0.0-beta.3, a beta release for 8.0.0. It is relatively stable, but there will be further additions and fixes before final release – Adafruit Blog.
NOTE: ESP32-C3 board builds are not functional since 8.0.0-beta.2. Use 8.0.0-beta.1. Beta 4 will correct this, to be released likely this week.
Notable changes to 8.0.0 since 7.3.0
- Added WiFi workflow with browser-based device discovery, filesystem browsing, upload, download, file editing, serial/REPL connection (available only on Espressif for now).
- Added a one-line status bar, which displays connection status, last exception, and version on a terminal window title or on the top line of an attached display. Support for status bar display is also being added to the Mu and Thonny editors.
.env
file in CIRCUITPY specifies WiFI connection parameters, BLE name, and other startup values.
dotenv
support: os.getenv()
values are set by values in .env
file. Values can be fetched from other dotenv-format files.
- WiFi functionality implemented on the Pi Pico W.
- Revised Espressif camera support, now available on ESP32, ESP32-S2, and ESP32-S3.
- Bulk analog input:
analogbufio
(available only on RP2040 for now).
- Pin state can be preserved during deep sleep (available only on Espressif for now).
- Allow setting USB VID, PID, manufacturer, and product ids at runtime.
- Enabled
collections.deque
on most builds.
MP3Decoder
and WaveFile
can now take a filename instead of an open file.
AnalogIn
values are full range from 0 to 65535, instead of having zeros on low-order bits.
- In-place firmware update (
dualbank
) capability may be disabled in favor of a larger CIRCUITPY drive.
- Added
TileGrid.contains()
.
- Added
os.utime()
.
- Added
coproc
module, for running programs on an on-chip co-processor. Currently available for the RISC-V core on the ESP32-S2 and ESP32-S3.
See more – GitHub.
Python 3.11 Released Monday October 24th
Python 3.11 was finally been released on October 24th. Some of the new features are below – Python.org, YouTube and an overview of features – Real Python.
- Better error messages with more informative tracebacks
- Faster code execution due to considerable effort in the Faster CPython project
- Task and exception groups that simplify working with asynchronous code
- Several new typing features that improve Python’s static typing support
- Native TOML support for working with configuration files
RedMonk Programming Language Survey: Python a solid #2
The quarterly RedMonk survey of programming language usage, with data taken from GitHub & Stack Overflow, has Python at the #2 spot after JavaScript – RedMonk.
MicroPython Code Optimization
Techniques for optrimizing MicroPython code – Ohidur.
Espressif DevCon22 Videos Available
The Espressif DevCon22 was last week. Adafruit’s Limor “Ladyada” Fried had a discussion about CircuitPython in Part 1 at 9:35:14 – Part 1 and Part 2.
Adafruit Eyes Ported to the RP2040 Microcontroller
Mark Komus has ported the Adafruit eyes animation code, originally written for SAMD21/51 microcontrollers, to run on RP2040 boards like the Raspberry Pi Pico. It uses DMA on one or two SPI peripherals (depending on how many eyes you animate) for speed. “The RP2040 code will use two cores for both eyes but the performance is not quite as great as the M4. My guess is the floating point unit in the M4 just gives it that extra kick.” – Twitter and GitHub.
More Halloween Projects
Creative folks continue making spooky projects in time for Halloween (October 31st in the US).
A single animated eye using a round LCD, a tiny Adafruit QT Py board and CircuitPython – Twitter Thread and GitHub.
The Pimorony Wireless Plasma Kit is a beginner friendly, internet connected mood-light-in-a-bottle that’s easy to program using MicroPython or CircuitPython – site.
A Raspberry Pi Pico and MicroPython animated skull, ready for the launch of an 8th grade “Intro to Animatronics” unit – Twitter.
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 on a Raspberry Pi Pico W trivia API game with DisplayIO.
You can see the latest video and past videos on the Adafruit YouTube channel under the Deep Dive playlist – YouTube.
CircuitPython Parsec
John Park’s CircuitPython Parsec this week is on Bluetooth Naming – 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 CircuitPythonShow is off this week. Last week featured Jim Mussared of MicroPython and next week is a special Halloween episode. Paul took the podcast on the road and visited Jason Pecor and the River Prairie Trolls – Show List.
The Bootloader Podcast
CircuitPython community members Paul Cutler and Tod Kurt have started a new podcast, The Bootloader. In episode three, among the topics Paul and Tod discuss include facial recognition using CircuitPython; and Tod shares a deep dive into CircuitPython’s ulab library – The Bootloader website and Twitter.
The CircuitPython Helpdesk Group, Halloween Edition
The CircuitPython Community Help Desk returns on Monday, October 31st from 7pm EDT to 10pm EDT. Developers will be on hand to help you wrap up your pull requests for Hacktoberfest 2022. Help will be available in the Adafruit Discord in both voice and chat in the #circuitpython-dev channel.
Chip Shortage: TDK Invensense MPU-6050 6_DOF Accelerometer + Gyroscope
Chip Shortage is a feature video by Adafruit’s Ladyada to highlight items that are in short supply or possibly “unobtainium” (with no known return date to the market). This week it is the Invensense MPU-6050. Digi-Key.
Used in the Adafruit MPU-6050 6-DoF Accel and Gyro Sensor – STEMMA QT Qwiic breakout board
Adafruit ordered 10K in May 2022 – ETA May 2023! – Adafruit Blog and YouTube.
Project of the Week: Faster CircuitPython LED Animations with ulab
Tod writes about achieving a 10x speedup on NeoPixel LED animations in CircuitPython using the Numpy-like ulab library – Twitter, Blog and Code.
For a simple fire animation that was optimized, the results are striking:
- fire_no_ulab.py: ~40 milliseconds per frame for 256 LEDs on an RP2040
- fire_with_ulab.py: ~4 milliseconds per frame for 256 LEDs on an RP2040
The technique is to create a “working copy” of the LED data in a ulab/numpy array, and use ulab functions as much as possible. Then at the last possible moment, copy the info from the working copy to the real LEDs object. It only adds a few lines of code to existing solutions and you get access to all these cool ulab array functions! (It would be really cool if the NeoPixel object could take a ulab array to avoid this copy).
News from around the web!
Auto-Lock your laptop screen with a person sensor using an Adafruit Trinkey and CircuitPython – hackster.io and YouTube.
Cyber City Circuits is building a round display powered by an RP2040 microcontroller. They have it running CircuitPython to make gauges and the Adafruit eye demo – Twitter.
An interactive, ferrofluid project. Electromagnets are controlled through a web server running on a Raspberry Pi Pico W and MicroPython – Twitter.
Using 7-segment displays, Raspberry Pi Pico W and CircuitPython to display different APIs like GitHub and YouTube – Twitter and Here.
A progress bar using a Raspberry Pi Pico, OLED and MicroPython – Twitter and GitHub.
3D printed Adafruit MacroPad RP2040 Build – Reddit.
Putting together a simple and affordable robot kit with a Raspberry Pi Pico to educate about microcontrollers and MicroPython – Twitter.
Turning a Big Mouth Billy Bass into a Raspberry Pi Pico W controllable robot hosting its own website at https://mouthpi.co – Twitter.
How to customize a USB HID device with CircuitPython – STEAM Tokyo (Japanese).
Making Raspberry Pi Pico fart noises with CircuitPython – Twitter.
Tutorial: Powering the Raspberry Pi Pico from external batteries with MicroPython – peppe80 via Twitter.
Making a NeoPixel bike light with a Raspberry Pi Pico W and MicroPython – Twitter.
A digital clock using a Raspberry Pi Pico and MicroPython – Twitter.
A CircuitPython library that “extends” the native keypad library to support MCP I2C IO expanders, where each IO pin is connected to a key switch – Twitter and GitHub.
A 3D printed cloud mount for a Raspberry Pi Pico – Twitter.
The Banana Pi M5 vs the Raspberry Pi 4B in new benchmarks – bret.dk.
Sorting a Python Dictionary: Values, Keys, and more – Real Python.
In preparation for the release of Python 3.11 (released October 24th), NumPy has gotten ahead of the pack and published wheels for CPython 3.11. This is great news for a lot of other packages that depend on NumPy and wouldn’t be able to get started on porting to 3.11 without the a NumPy 3.11 wheel – Real Python News.
PyDev of the Week: Marin Kozak on Mouse vs Python
CircuitPython Weekly Meeting for October 24, 2022 (notes) on YouTube
#ICYDNCI What was the most popular, most clicked link, in last week’s newsletter? Espressif DevCon22.
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 two new boards 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!
PyLeap CLUE Barometer from Liz Clark
Adafruit PCA9548 8-Channel STEMMA QT / Qwiic I2C Multiplexer from Liz Clark
CircuitPython Libraries!
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 378!
Updated 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!
Dan
I released CircuitPython 8.0.0-beta.3 on October 20. This has some more Pico W WiFi additions and fixes from Jeff. It also fixes some ESP32 board builds that would not run. I’m still working on figuring out why our ESP32-C3 builds stopped working after an update to the Espressif ESP-IDF library, which we use for all Espressif ports. The update fixed a bunch of WiFi problems, but also broke the C3 builds, apparently due to a compiler update.
We are whittling down the remaining issues for 8.0.0 final, but a couple of dozen remain.
Kattni
I’m back this week after a couple of weeks out sick. I finished up the LTR-329 and LTR-303 light sensors guide. This guide has everything you need to get started with your LTR-329 or LTR-303. Next up is the PCF8575 guide. The breakout is very similar to its cousin the PCF8574 which already has a guide, so this should prove to be a quick one.
Melissa
This past week I spent some time working on a guide for the live stream robot build I did on CircuitPython day. I also merged in some new Blinka boards. We’re almost up to 100 now.
Tim
This week I was working on some Trivia games that run on Pico W to try out the recently implemented WiFi support. I found and documented an issue with returning large responses bigger than a certain size from an HTTPServer. As a short term fix I submitted a change for the HTTPServer library to send smaller chunks when it writes to the socket. The limit turned out to be a deeper issue inside the core and was resolved there within a few days.
Jeff
I’ve continued whittling away at user-reported problems with the Pico W. However, for about two days this week we put my CircuitPython work on hold so that I could port Doom to a candy bar. It’s not playable (there are no controls, so it just loops the demo videos), but the demos run great; you can get the binary and source code on Adafruit’s GitHub.
Liz
I published the Quick-Start the Pico W WiFi with CircuitPython guide. I was excited to finish it up for the weekend as 8.0.0-beta2 was released in case folks were doing weekend hacking with the Pico W. The guide has examples for a basic WiFi test, the Adafruit quotes API, the OpenWeatherMap API, Twitter API, Adafruit IO and Azure IoT Central. I also included a page on using Environmental Variables, aka an .env file, in place of secrets.py for credentials since that concept was a little confusing to me at first.
I also worked on a new product guide for the PCA9548 I2C multiplexer. This board is really cool because it has STEMMA QT connectors making it solderless. I also updated the TCA9548A guide to include a page on usage with CircuitPython.
Upcoming events!
The next MicroPython Meetup in Melbourne will be on October 28th – Meetup. See the slides of the September 28th meeting.
October is Open Hardware Month – OSHWA.
After two years in remote mode, Hackaday is very excited to announce that this year’s Hackaday Supercon will be coming back, live! Nov. 4th, 5th, and 6th in sunny Pasadena, CA for three days of hacks, talks, and socializing with the Hackaday community – Call for proposals and Hackaday.
RISC-V Global Summit, December 12-15, 2022 San Jose, California US – Linux Foundation, YouTube via Twitter.
PyCon US 2023 will be April 19-17, 2023, again in Salt Lake City, Utah US – PyCon US 2023.
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 upcoming events, please let us know on Twitter with hashtag #CircuitPython or email to cpnews(at)adafruit(dot)com.
Latest releases
CircuitPython’s stable release is 7.3.3 and its unstable release is 8.0.0-beta.3. New to CircuitPython? Start with our Welcome to CircuitPython Guide.
20221021 is the latest CircuitPython library bundle.
v1.19.1 is the latest MicroPython release. Documentation for it is here.
3.11.0 is the latest Python release. The latest pre-release version is 3.12.0a1.
3,233 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
STEM Program Instructor – White Mountain Science, Inc. – Adafruit Jobs Board.
35,756 thanks!
The Adafruit Discord community, where we do all our CircuitPython development in the open, reached over 35,756 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.
Contribute!
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.