Daily tips and tricks from the experts at Adafruit!
View this email in your browser

View this email in your browser. Warning: Flashing Imagery

Welcome to the latest Python on Microcontrollers newsletter! A taste of CircuitPython 9 is finally out this week in an alpha release. Updates from the latest MicroPython and the Espressif IDF, better USB Host support and much more. Documentation and software supporting the new Raspberry Pi 5 are both finally coming out. And hardware is also getting into folks’ hands. There are some changes happening in the newsletter as I’m looking to make it more focused to you, the reader. Comments are welcome at cpnews(at)adafruit(dot)com – Anne Barela, 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 9.0.0 Alpha Is Out With New Features

CircuitPython 9.0.0 Alpha

CircuitPython 9.0.0-alpha.2, an alpha release for 9.0.0 has been released. Version 9 adds significant capabilities over Version 8 – Adafruit Blog and release notes – GitHub.

Notable changes to 9.0.0

  • Merge updates from MicroPython v1.19.1, v1.20.0, and v1.21.0.
  • Espressif: update to ESP-IDF v5.1.
  • Remove 8.x.x deprecations: displayio.*.show(), I2CPeripheral: now I2CTarget.
  • Add repl.py, which runs just before the REPL starts up.
  • Add OrderedDict.move_to_end().
  • Add synthio.Synthesizer.note_state.
  • Further USB host support, on i.MX and RP2040.
  • Reorganize and split displayio.
  • Add warnings module, similar to what is in CPython.

The CircuitPython Blinka Python Compatibility Layer Now Supports Raspberry Pi 5

Blinka Python Now Supports Raspberry Pi 5

The CircuitPython Blinka Python compatibility layer now supports Raspberry Pi 5. Create CircuitPython programs for Raspberry Pi and other Single Board Computers (SBCs) running Python. Raspberry Pi 5 support added via the latest Pi 5 compatible version of libgpiod – PyPI and GitHub.

For more on Blinka – CircuitPython.org, Adafruit Learning System and GitHub.

Using Python Virtual Environments on Raspberry Pi

Python venv

Starting with the October 10, 2023 Bookworm release of the Raspberry Pi OS, the use of Python Virtual Environments (venv) when pip installing packages is required. No more sudo pip. This will break things and require learning new things. This change is being done to protect the system level Python installation. This is not a new issue and using venv has long been the recommended solution. We’ve just been slow to adopt this on Raspberry Pi boards. Learn more – Adafruit Learning System.

How To Install Python Modules on Raspberry Pi 5 and Earlier Models

Les Pounder at Tom’s Hardware also discusses this topic with How To Install Python Modules on Raspberry Pi 5 and Earlier Models – Tom’s Hardware.

Latest Raspberry Pi Imager Released

Raspberry Pi Imager

Version 1.8.1 of the Raspberry Pi Imager has been released, which comes with much better support for configuring an installation. Raspberry Pi has totally rewritten their Getting Started documentation – Raspberry Pi via X.

The Risk of RISC-V: What’s Going on at SiFive?

The Risk of RISC-V: What’s Going on at SiFive?

Reports from multiple sources indicate that the major torch bearer of the RISC-V platform, SiFive, formed from the original architects of the RISC-V instruction set, has gone through some major changes – Adafruit Blog and YouTube.

The Official Raspberry Pi Handbook 2024 Is Out Now

The Official Raspberry Pi Handbook 2024 out now!

The Official Raspberry Pi Handbook 2024 is out, packed with projects, step-by-step tutorials, practical guides, and reviews of the best kit – Raspberry Pi Press.

This Week’s Python Videos

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

Deep Dive

Last Friday, Scott streamed work on CircuitPython 9.0.0 alpha and split heaps.

You can see the latest video and past videos on the Adafruit YouTube channel under the Deep Dive playlist – YouTube.

CircuitPython Parsec

CircuitPython Parsec

John Park’s CircuitPython Parsec this week is on Print Debugger – Adafruit Blog and YouTube.

Catch all the episodes in the YouTube playlist.

CircuitPython Weekly Meeting

CircuitPython Weekly Meeting for October 23, 2023 (notes) on YouTube.

Project of the Week: A QR Code Menu Printer

QR Code Menu Printer

A LA QRTE is a portable, combination scanner/printer for converting QR code menus into physical copies.

It runs on a rechargeable 12V battery and uses a Tiny Code Reader (from Useful Sensors) for QR scanning. It uses a Seeed Studio XIAO Esp-32 S3 to read from the scanner, communicate with the backend, and drive a thermal printer module, talking to a web server written in CircuitPython that fetches menus, scrapes text, feeds it to ChatGPT, and formats the final result – Hackaday, YouTube and GitHub.

New Notes from Adafruit Playground

Adafruit Playground is a new place for community members to post their projects and other making tips/tricks/techniques. Ad-free, it’s an easy way to publish your work in a safe space for free.

Comparing libgpiod and gpiozero speeds on the Raspberry Pi 5

Comparing libgpiod and gpiozero speeds on the Raspberry Pi 5 – Adafruit Playground.

12-Panel Matrix Portal Display

Making a huge 12-Panel Matrix Portal Display – Adafruit Playground.

DIY Bubble Machine Using Raspberry Pi Pico

DIY Bubble Machine Using Raspberry Pi Pico and MicroPython – Adafruit Playground and YouTube.

MIDI Commander

MIDI Commander is a PyGamer-based MIDI SysEx Patch Loader / MIDI snippet player – Adafruit Playground.

Popular Last Week

What was the most popular, most clicked link, in last week’s newsletter? PDF book on GPIO Zero (free).

News from around the web!

RasPi Pico Arbitrary Waveform Generator

RasPi Pico Arbitrary Waveform Generator

AWG is a 2 independent channel arbitrary waveform generator using a Raspberry Pi Pico and MicroPython – X and GitLab.

An ‘arbitrary waveform generator’ or AWG is able to generate a range of waveforms. This code uses the Raspberry Pi Pico and its PIO, state machines, and DMA to provide two completely independent waveforms. Each waveform generates values between 0v and VCC (3.3V on the Pico). It is possible to add a combination of voltage dividers and an opamp to provide larger or smaller ranges or make the output a +/- range.

The Pi Cast has James Adams from Raspberry Pi to talk about the Raspberry Pi 5

The Pi Cast hosted James Adams from Raspberry Pi to talk about the Raspberry Pi 5 – Tom’s Hardware via X.

Flip Clock Library

Experimenting with the flip clock library on a dot clock display with CircuitPython. The font size is 92 on the 720×720 display – Mastodon.

Fake vectorscope fun in prep for Hackaday Supercon

Having some fake vectorscope fun in prep for Hackaday Supercon. This is CircuitPython scribbling on a bitmap – Mastodon and GitHub.

Web Interface

AstraLuma on Mastodon has a pre-alpha tool that currently lets you do bulk push/pull of files with WiFi-based boards. The UX is unfinished, and it’s mostly unimplemented features, but it’s good enough to do some ESP32 development with – Mastodon and GitHub.

Raspberry Pi Pico powered video-call status indicator

A Raspberry Pi Pico and MicroPython powered video-call status indicator – X and YouTube Playlist.

RP2040 Joystick Mouse

Rev 2.0 of the RP2040 Joystick Mouse using a Seeed Xiao and CircuitPython – hackster.io.

Teacher’s Pi cluster controls digital learning classroom

Teacher’s Pi cluster controls digital learning classroom – Raspberry Pi.

Booting the Raspberry Pi 5 With an NVMe SSD

Booting the Raspberry Pi 5 With an NVMe SSD – Jeff Geerling and hackaday via X.

PyCon US 2024

PyCon US 2024 Launches – May 15-23 in Pittsburgh, Pennsylvania US – PyCon US.

BLIZZARD-S3 3D GRAPHICS

Adding basic 3D drawing capabilities to the BlizzardS3 CircuitPython graphics library – YouTube.

Game with ChatGPT

Making a game for Raspberry Pi Pico via MicroPython with ChatGPT assistance – X.

Hydroponic System with W5100S-EVB-PICO and Blynk

Hydroponic System with W5100S-EVB-PICO, CircuitPython and Blynk – hackster.io.

WaveDrom

The WaveDrom plugin for Visual Code makes timing diagrams and bitfield illustrations right there and not have to use a standalone app or online service – X and WaveDom.

PyGWalker

PyGWalker can simplify your Jupyter Notebook data analysis and data visualization workflow, by turning your pandas dataframe (and polars dataframe) into a Tableau-style User Interface for visual exploration – GitHub.

Make Your Ordinary Washing Machine Smart using Python

Make your ordinary washing machine smart using Python – Adafruit Blog and YouTube.

Create a Screen recorder using Python

Create a Screen recorder using Python – X.

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 no new boards added but several have been submitted and they will be listed next week.

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

New Learn Guides

Python Virtual Environment Usage on Raspberry Pi from Carter Nelson

CircuitPython Libraries

CircuitPython Libraries

The CircuitPython library numbers are continually increasing, while existing ones continue to be updated. Here we provide library numbers and updates!

To get the latest Adafruit libraries, download the Adafruit CircuitPython Library Bundle. To get the latest community contributed libraries, download the CircuitPython Community Bundle.

If you’d like to contribute to the CircuitPython project on the Python side of things, the libraries are a great place to start. Check out the CircuitPython.org Contributing page. If you’re interested in reviewing, check out Open Pull Requests. If you’d like to contribute code or documentation, check out Open Issues. We have a guide on contributing to CircuitPython with Git and GitHub, and you can find us in the #help-with-circuitpython and #circuitpython-dev 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 455!

New Libraries!

Here’s this week’s new CircuitPython libraries:

Updated Libraries!

Here’s this week’s updated CircuitPython libraries:

Library PyPI Weekly Download Stats

Total Library Stats

  • 156609 PyPI downloads over 316 libraries

Top 10 Libraries by PyPI Downloads

  • Adafruit CircuitPython BusDevice (adafruit-circuitpython-busdevice): 8779
  • Adafruit CircuitPython Requests (adafruit-circuitpython-requests): 8202
  • Adafruit CircuitPython Register (adafruit-circuitpython-register): 3143
  • Adafruit CircuitPython ADS1x15 (adafruit-circuitpython-ads1x15): 1698
  • Adafruit CircuitPython Wiznet5k (adafruit-circuitpython-wiznet5k): 1312
  • Adafruit CircuitPython Motor (adafruit-circuitpython-motor): 1282
  • Adafruit CircuitPython Display Text (adafruit-circuitpython-display-text): 1269
  • Adafruit CircuitPython DHT (adafruit-circuitpython-dht): 1229
  • Adafruit CircuitPython MiniMQTT (adafruit-circuitpython-minimqtt): 1212
  • Adafruit CircuitPython ESP32SPI (adafruit-circuitpython-esp32spi): 1171

What’s the CircuitPython team up to this week?

What is the team up to this week? Let’s check in!

Dan

Scott and I finished merging MicroPython v1.21.0 into CircuitPython. We are now caught up with the latest MicroPython release.

I am debugging a certificate issue with NINA-FW, which is the ESP32 firmware used on AirLift boards. It does not handle ECDSA certificate chains properly. Interestingly, we discovered that rolling back to a very old version of NINA-FW does work, so we need to see what has changed that causes the regression.

We have released CircuitPython 9.0.0-alpha.2, the first published release of the 9.0.0 series. Alpha.0 and alpha.1 were not released: they were just labels to mark significant points. But they were using other versions of the .mpy format, and we wanted all 9.0.0 releases to use the same format.

Melissa

This past week I updated Blinka to run on the Raspberry Pi 5. I used libgpiod as the underlying library and added support for pullups and pulldowns which previously had not been working.

Tim

This week I tested some changes to the core displayio API on a few different types of displays. I also worked to re-create an issue a user is having with the Cleveland art PyPortal project. After testing many versions of nina-firmware for the co-processor it’s been determined that an old version perhaps shipped on the device originally is able to work successfully, but newer ones aren’t. While investigating that issue I found an unrelated problem that BitmapLabel can have with certain fonts and text values shown, I’m working now on a fix for that issue.

Scott

This week Dan and I got version 1.21 of MicroPython merged into CircuitPython main, which will be released as 9.0. This is a big milestone because it’s one of the last major changes to do on it. (The ESP-IDF has already been updated to 5.1 from 4.4.) I’ve also done all of the breaking changes and am working to add the ability to warn when APIs will be broken in the future. The last major thing on my list is reworking CircuitPython to grow it’s heap automatically and simplify our ability to allocate memory to use outside the VM. 9.0.0 alphas are now being released!

Liz

This past week I worked on a fun collaboration with Noe. He designed a case for the HUSB238 breakout, which lets you request different voltages from a USB PD power supply aka turn your devices that use a wall wart into USB C devices. I had a MIDI keyboard that used a 12V wall wart that had a very short cable, so I wanted to make it USB C. This became the use case that we showed in the guide and in the project video. I added a page to the guide documenting how to check a wall wart supply for the information needed to convert it to USB C with the HUSB238.

Upcoming Events!

Hackaday Supercon 2023

Hackaday has announced that the Hackaday Supercon is on for 2023, and will be taking place November 3 – 5 in Pasadena, California, USA – Adafruit Blog and Hackaday.

 

MicroPython Meetup

The next MicroPython Meetup in Melbourne will be on November 22nd – Meetup.

PyLadiesCon

The inaugural PyLadies Conference will take place December 1-3, 2023 – pretalx.

Pyjamas 2023

The Pyjamas Conference, the 24-hour online Python conference, will be returning for a fifth year on December 9-10.

PyCon US 2024

PyCon US 2024 Launches – May 15-23 in Pittsburgh, Pennsylvania US – PyCon US.

Send Your Events In

If you know of virtual events or upcoming events, please let us know via email to cpnews(at)adafruit(dot)com.

Latest Releases

CircuitPython’s stable release is 8.2.7 and its unstable release is 9.0.0-alpha2. New to CircuitPython? Start with our Welcome to CircuitPython Guide.

20231025 is the latest Adafruit CircuitPython library bundle.

20231020 is the latest CircuitPython Community library bundle.

v1.21.0 is the latest MicroPython release. Documentation for it is here.

3.12.0 is the latest Python release. The latest pre-release version is 3.13.0a1.

3,693 Stars Like CircuitPython? Star it on GitHub!

Call for Help – Translating CircuitPython is now easier than ever!

CircuitPython translation statistics on weblate

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.

37,941 Thanks!

37,941 THANKS

Adafruit Discord

The Adafruit Discord community, where we do all our CircuitPython development in the open, reached over 37,941 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

ICYMI

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, Instagram Reels), 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.

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.