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! After last week’s news on Raspberry Pi, the hits keep coming (I had a hunch the Fall would bring nice surprises). The next great release of MicroPython is available with all sorts of goodies. And not to be outdone, Python 3.12 is finally out. More on Raspberry Pi 5 is being released: you can see them at several events worldwide. And find out about the homebrew RP1 chip on the board in the article now out. All this and some really great projects (check out PyDOS!) – 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:

MicroPython 1.21 Released!

MicroPython 1.21 Released

MicroPython 1.21 was released Friday with significant changes since the 1.20 release last April:

New and Changed

  • Built-in modules to remove the u-prefix
  • Switching of the esp32 port to use IDF 5
  • Support for BLE on RPi Pico W boards
  • Importing has been tweaked and optimised
  • Conversion specifiers in f-strings (e.g. !r)
  • ESP8266 and ESP32 ports add support for the Espressif ESP-NOW protocol
  • An extensive LoRa module has been added
  • And much more

All of this without a performance hit since the previous release – GitHub.

Python 3.12.0 Final Released

Python 3.12.0

Python 3.12 final is now out – Python.org.

New features

  • More flexible f-string parsing, allowing many things previously disallowed (PEP 701).
  • Support for the buffer protocol in Python code (PEP 688).
  • A new debugging/profiling API (PEP 669).
  • Support for isolated subinterpreters with separate Global Interpreter Locks (PEP 684).
  • Even more improved error messages. More exceptions potentially caused by typos now make suggestions to the user.
  • Support for the Linux perf profiler to report Python function names in traces.
  • Many large and small performance improvements (like PEP 709 and support for the BOLT binary optimizer), delivering an estimated 5% overall performance improvement.

The PSF also has announced Python 3.11.6 – PSF and download.

Open Hardware Summit 2024 – Call for Proposals

Open Hardware Summit 2024

The Open Hardware Summit is the annual conference organized by the Open Source Hardware Association, a 501(c)(3) not for profit charity. It is the world’s first comprehensive conference on open hardware; a venue and community to discuss and draw attention to the rapidly growing Open Source Hardware movement.

Speakers include world renowned leaders from industry, academia, the arts and maker community. Talks cover a wide range of subjects from electronics, mechanics to related fields such as digital fabrication, fashion technology, self-quantification devices, and IP law. As a microcosm of the Open Source Hardware community, the Summit provides an annual friendly forum for the community.

Tentative dates are April 26th and 27th. Livestream and remote talks will be permitted.

OSHWA is officially on the prowl for wonderful talks, workshops and exhibitions for Open Hardware Summit 2024 in Montreal. Fill out the call for proposals form and toss your hat in the ring to make OHS2024 extra cool and fun – 2024.oshwa.org and the proposal form.

Experience Raspberry Pi 5 Events

Experience Raspberry Pi 5 Events

Experience Raspberry Pi 5 provides hands-on with the all-new Raspberry Pi 5 at special events organised by Raspberry Pi and enthusiasts worldwide – Raspberry Pi.

RP1: The Custom Silicon Controlling Raspberry Pi 5 I/O

RP1

Raspberry Pi 5 is the most complicated and expensive engineering program ever undertaken at Raspberry Pi, spanning over seven years, and costing on the order of $25 million. It’s their first flagship product to make use of silicon designed in-house at Raspberry Pi, in the form of the RP1 I/O controller. No, the RP2040 came second, unknown to the world (the 2 was not the number of cores on the chip) – Raspberry Pi, initial documentation and YouTube video. Bonus video: James Adams and Eben Upton on designing Raspberry Pi 5.

WipperSnapper Updates Wednesday: UART Support, Device Auto-Configuration, and New Sensors

WipperSnapper Updates Wednesday

This week’s edition of WipperSnapper Updates highlights UART support, device auto-configuration, and new sensors – Adafruit Blog.

WipperSnapper is a firmware designed to turn any WiFi-capable board into an Internet-of-Things (IoT) device without programming a single line of code. WipperSnapper connects to Adafruit IO, a web platform designed to display, respond, and interact with your project’s data.

lgpio – a Python module which allows control of GPIO on a Linux SBC

lgpio

lgpio is a module for Linux Single Board Computers (SBC) which allows control of the General Purpose Input Outputs (GPIO). It comes with C and Python bindings and is installable via PyPI – abyz.me.uk.

Features

  • Reading and writing GPIO singly and in groups
  • Software timed PWM and waves
  • GPIO callbacks
  • Pipe notification of GPIO alerts
  • I2C wrapper
  • SPI wrapper
  • Serial link wrapper

Hacktoberfest 10 is Here

Hacktoberfest

This year marks the 10th anniversary of Hacktoberfest! Hacktoberfest has grown from 676 participants in 2014 to nearly 147,000 participants last year – Hacktoberfest.

What is Hacktoberfest?

“Join forces in virtual and in-person events to get your project’s pull/merge requests done as a team, learn new skills, and meet lifelong friends. This year we’re partnering with Major League Hacking to help the community connect. Open source projects, maintained by community-minded coders, make the modern internet function. Supporting that essential work, and the folks behind it, is what Hacktoberfest is all about.”

As in previous years, CircuitPython will be participating in Hacktoberfest, marking some pull requests as Hacktober eligible. The list of CircuitPython issues is here. More info – Adafruit Blog.

Note the reward system is shifting from T-shirts to virtual rewards – Hacktoberfest Rewards.

Tiny Tapeout 5 Open – Make your Own Custom Chip!

Tiny Tapeout 5

Tiny Tapeout is an educational project that makes it easier and cheaper than ever to get your digital designs manufactured on a real chip. This is the fifth batch, the first was done in Fall 2022Tiny Tapeout and YouTube.

  • Design (single tile) + Physical PCB + ASIC = $100 + shipping
  • Design only (single tile): $50
  • Extra tiles are $50 each
  • Top clock speed ~50MHz
  • Max size is about 1000 digital logic gates per tile
  • Closing date is 4th of November

This Week’s Python Streams

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 MicroPython 1.20 fixing and memory system changes.

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 past week is on Bitmap Label Highlighting – Adafruit Blog and YouTube.

Catch all the episodes in the YouTube playlist.

Project of the Week: PyDOS running on a CircuitPython Tablet

PyDOS

PyDOS

PyDOS is an MS-DOS like shell for microcontrollers running MicroPython or CircuitPython, running on the HackTablet. The HackTablet uses an ESP32-S3 and gives you a handheld tablet with much of the capability of an original IBM PC and includes an onscreen keyboard capability – YouTube, Hacktablet and GitHub.

News from around the web!

micro REPL

Micro REPL is MicroPython as an Android phone app. It has a terminal, file explorer and a smart code editor. The phone needs USB OTG capability to connect to a microcontroller (over USB) that has been flashed with MicroPython – GitHub via Mastodon.

Haiku bot

A haiku bot running on an Adafruit MagTag coded in CircuitPython – Mastodon.

$10 Robot

$10 Robot is an inexpensive educational robotics platform. Everything you need to build and program a simple robot running MicroPython or CircuitPython – hackaday.io via X.

PicoWall-e

Making progress of sorts on PicoWall-e. I modified the Pico WiFi robot code (MicroPython) from Chris Barnatt to have Wall-e start up its own WiFi hotspot, and I can send commands from my browser, but (there is) not enough power from a 9V PP3 to drive the motors and clunky tracks – X.

Capacitive candy bowl

Prototyping a capacitive candy bowl that reacts when candy is taken with a USB Nugget, speaker, and CircuitPython – X.

Capacitive candy bowl

This CircuitPython project has a terminator scream at you for taking candy – X.

IV3 Clock

The IV3 tube clock is powered by CircuitPython and compatible with the Adafruit QT Py and Seeed XIAO – Kickstarter via X.

Automating LEGO

Using a Raspberry Pi Pico and CircuitPython to add sound in a motorized LEGO diorama (French) – X.

Speech Demo

A speech demonstration with MicroPython and a SYN6988 a text-to-speech (TTS) module – X.

Plant watering

A plant watering robot with a Raspberry Pi, some basic hardware and MicroPython. You can keep your plants healthy and happy from anywhere in the world – hackster.io.

Top switches of September, 2023

The top keyboard switches of September 2023 – kbd.net via X.

Lisp Badge LE

A self-contained low-power computer with its own display and keyboard that you can program in uLisp, a version of the high-level language Lisp for microcontrollers. It uses an AVR128DB48 microcontroller which provides 128K bytes of flash memory, and 16K bytes of RAM – Technoblogy.

PyDev of the Week: Sarah Boyce on Mouse vs Python.

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

#ICYDNCI What was the most popular, most clicked link, in last week’s newsletter? Free Book: Research Software Engineering with Python.

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 three 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!

New Learn Guides

RGB Matrix New York Times Title Scroller from Trevor Beaton

LED Matrix Sports Scoreboard from Liz Clark

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 449!

Updated Libraries!

Here’s this week’s updated CircuitPython libraries:

Library PyPI Weekly Download Stats

Total Library Stats

  • 116600 PyPI downloads over 313 libraries

Top 10 Libraries by PyPI Downloads

  • Adafruit CircuitPython Requests (adafruit-circuitpython-requests): 9337
  • Adafruit CircuitPython BusDevice (adafruit-circuitpython-busdevice): 7237
  • Adafruit CircuitPython Register (adafruit-circuitpython-register): 3143
  • Adafruit CircuitPython Motor (adafruit-circuitpython-motor): 1664
  • Adafruit CircuitPython NeoPixel (adafruit-circuitpython-neopixel): 1662
  • Adafruit CircuitPython ServoKit (adafruit-circuitpython-servokit): 1553
  • Adafruit CircuitPython PCA9685 (adafruit-circuitpython-pca9685): 1538
  • Adafruit CircuitPython Pixelbuf (adafruit-circuitpython-pixelbuf): 1170
  • Adafruit CircuitPython ADS1x15 (adafruit-circuitpython-ads1x15): 1109
  • Adafruit CircuitPython DHT (adafruit-circuitpython-dht): 1086

What’s the CircuitPython team up to this week?

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

Dan

Last week I continued to work on the MicroPython v1.20.0 merge. I’m going through the ports, picking representative boards, and getting them to compile. Most of the errors I’m seeing are simple errors from the merge and needed updates.

We dropped building Version 7.x bundles a few days ago. I updated the circup utility to take note of this.

Melissa

Melissa

This past week, I added eInk support to Blinka displayio so that even more projects can be run on Blinka. This can be used instead of the Adafruit_CircuitPython_EPD library that the guides have been recommending for the past few years.

Tim

This week I’ve been working on enhancing the automated library release utility to make it less hardcoded and more generally useful in cases that aren’t the exact same type of patch that was recently rolled out which it was originally made for. I’ve also submitted some old kits to OSHWA for certification. Lastly I submitted the first device simpletest script that we discussed during the meeting a few weeks back.

Scott

This past week I’ve been diving into CircuitPython’s memory allocation mechanics. It was prompted by crashes I saw when re-enabling rgbmatrix on ESP IDF 5.1. rgbmatrix does allocations for the underlying Protomatter library. It does this using the existing supervisor memory manager. The manager’s responsibility is to allocate memory in the VM heap when the VM is running and then move and consolidate it when the VM finishes. Moving memory is the problem because Protomatter expects its memory to stay in the same place. We work around it by reinitializing Protomatter after memory is moved. This isn’t perfect because Protomatter may still use it after the memory is moved but it hasn’t been reinitialized.

So, after brainstorming and talking with other folks, we’ve decided to remove the supervisor memory management in favor of using a traditional heap in combination with MicroPython’s new split heap functionality. This will allow us to allocate memory outside the VM even when the VM is running (assuming it hasn’t used up all memory) and not have to move it after the VM is done. On ports like ESP32 where the vendor SDK already has a heap, we’ll just reuse that. MicroPython just started doing this. Thanks to the MicroPython folks for the new capabilities we’ll use in CircuitPython 9!

Liz

This week I worked on some code for an upcoming project with the Ruiz brothers. It is a prop project to recreate the Fraz Wrench from the Five Nights at Freddy’s games. The code is written in CircuitPython and runs on the RP2040 Prop-Maker Feather. Sound effects from the game are played through the I2S amp and various messages are shown on an LCD character display. The wrench is used to solve puzzles in the game so there is a puzzle mode in the code. In that mode, the LCD shows random letters and numbers on it. To do this, I wrote a function that randomly generates a string to show on both lines of the LCD. I hope this project will be another fun CircuitPython prop example for folks.

Upcoming Events!

Maker Faire Bay Area

Maker Faire Bay Area will be October 13-15 & October 20-22, 2023 – Eventbright.

MicroPython Meetup

The next MicroPython Meetup in Melbourne will be on October 25th – Meetup.

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.

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.

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.6. New to CircuitPython? Start with our Welcome to CircuitPython Guide.

20231003 is the latest Adafruit CircuitPython library bundle.

20231004 is the latest CircuitPython Community library bundle.

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

3.12.0 is the latest Python release.

3,675 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,828 Thanks!

37,828 THANKS

Adafruit Discord

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