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,956 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! We’re on Discord, Twitter, and for past newsletters – view them all here. If you’re reading this on the web, subscribe here. Let’s get started!
CircuitPython 7.0.0 Alpha 6 Released
CircuitPython 7.0.0-alpha.6, has been released. 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 since 6.3.0 include:
- Support for the CircuitPython development workflow over BLE.
- Camera support on ESP32-S2.
- The keypad key-scanning module.
- Run-time customization of USB devices.
- Merging in of MicroPython fixes and enhancements as of MicroPython 1.16.
colorwheel()routine moved to
supervisor.ticks_ms()to allow easier time-keeping.
- Simplifications to the RGB status LED codes.
- A clocking fix for a few samples of RP2040 boards.
- Rework of
vectorioand some of its API.
VectorShapeis no longer needed for user code.
board.LEnow consistently present on all boards that have such an LED.
PulseOutno longer needs a
Join Hackaday, Digi-Key, and Adafruit for a Halloween-themed contest! They want to see your crazy, creepy, ghostly, spooky, and awesome projects.
If costumes are your favorite part of Halloween, then why not dress up your outfit with some hacked upgrades? You could even design a ghoulish prop to add to your home’s Halloween décor or light up a Jack-o-lantern with LEDs. Whether it’s technical, artistic, or just plain terrifying, Hackaday wants to see your projects!
Check out the Halloween Show & Tell with Hackaday, Friday, October 29th at 1 pm PT, to show off your awesome projects entered in the contest. Don’t forget to also share your projects on social media and use the #HalloweenHackfest!
Tom’s Hardware Adafruit MacroPad RP2040 Review: The Ultimate DIY Keypad
Tom’s Hardware just reviewed the Adafruit MacroPad USB keyboard. Their verdict: The best codable keypad on the market, Adafruit’s MacroPad RP2040 is stuffed with features you won’t find elsewhere – Tom’s Hardware and Adafruit Blog.
An Asteroid-like Game in CircuitPython for 6 Different Microcontroller Boards
Tod Kurt (@todbot) has created an Asteroids-like game in CircuitPython. It currently runs on the Adafruit MacroPad, FunHouse, CLUE, PyGamer, Pybadge and the OSHW 2020 Badge. One code file for 4 different microcontrollers (nRF52840, ESP32-S2, RP2040, and SAMD51) and different displays!
Codespace for GitHub Arrives
GitHub’s Codespaces, cloud-based development environments that have been in preview since May 2020, are finally here. When you create a Codespace, a shallow clone of your repository is made on a Linux virtual machine that is both dedicated and private. Prices range from $0.18 to $2.88 per hour. GitHub released Codespaces yesterday for organizations using Team and Enterprise plans. Individuals can continue to use the Codespaces beta if they have succeeded in obtaining access. GitHub said: “We’ll share updates on what’s coming in the near future.”
GitHub has another neat feature called github.dev, which will remain free. When in a code repository, press the full stop character (period key) and an editor opens using a lightweight Codespace. What this means is that any file can be edited in the browser using a cut-down browser version of Visual Studio Code – which is very like the desktop version. There is no run or debug option in this lightweight environment, and clicking to debug prompts a dialog offering to continue either by cloning the repository locally or by starting a full Codespace – The Register.
Linux and MicroPython on a simulated RISC-V chip running on a graphics card fragment shader
CircuitPython Deep Dive Stream with Scott Shawcroft
This week, Scott answers questions and fixes more bugs for CircuitPython 7.0.0.
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!
… demonstrating the use of the new RP2040-based Macropad from Adafruit as a hotkey controller for FFXIV! There are tons of ways to program this little thing, but of course my brain went right to using it for video games – Twitter.
A video tutorial: How to Install Visual Code Studio for working with CircuitPython – YouTube.
A pixel-model of the Raspberry Pi Pico, sized for display on the Adafruit MacroPad with CircuitPython – Adafruit Forums.
A macro keypad for the Vim editor with the Adafruit MacroPad and CircuitPython – Adafruit Blog.
A MacroPad/AdaBox19 hotkeys YouTube playback controls macro – Adafruit Forums.
Writing some CircuitPython code to use a rotary encoder as an input for Pimoroni’s new Plasma 2040 – Twitter.
nVidia’s CUDA Python provides Cython bindings and Python wrappers for the driver and runtime API for existing toolkits and libraries to simplify GPU-based accelerated processing. The goal of CUDA Python is to unify the Python ecosystem with a single set of interfaces that provide full coverage of and access to the CUDA host APIs from Python – nVidia.
Getting started with Raspberry Pi Pico using MicroPython – CircuitDigest.
Why Your Dev Board Won’t Catch On: A Retrospective of Arduino’s Popularity – LinkedIn.
Languages like MicroPython and CircuitPython excite me, as they offer easy ramps to using microcontrollers, especially for those coming from the software world where Python is a popular language. They don’t necessarily solve the issue of cheap dev boards, but the communities do seem to be growing. Focusing on ease-of-use (despite any losses in efficiencies) is a key takeaway from the above factors. As an engineer, if I can’t understand your API and get an LED blinking in a couple of hours, I’m likely going to look elsewhere (unless, for some reason, I’m forced to use your platform).
20 useful tricks & tips in Python – Twitter Thread.
Python Standard Library security-specific recommendations – Python Documentation.
PyDev of the Week: Daniel Zingaro on Mouse vs Python
#ICYDNCI What was the most popular, most clicked link, in last week’s newsletter? Why There are Now So Many Shortages (It’s Not COVID) (YouTube).
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 ten new boards added!
- CrumpS2 ESP32-S2 Development Board
- Cucumber M
- Cucumber MS
- Cucumber R
- Cucumber RS
- MicroMod STM32 Processor
- Plasma 2040
- micro:bit v2
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 332!
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 see!
I was able to fix the “crackling” audio playback we were seeing on RP2040. Audio playback is done with two buffers which are used in alternation: while one buffer is being played using DMA, the other is being filled.
I instrumented the “DMA complete” interrupts and the buffer filling by toggling pins, and then observing the traces with a Saleae logic analyzer. I was able to determine that the wrong buffer was being filled when crackling audio was present. The flip-flopping between buffers was out of phase, probably due to an intermittent timing problem. I rewrote the code to determine which buffer actually needed filling by looking at the interrupt information in detail, instead of simply alternating between the buffers.
This same issue may be present on the SAMD51 implementation, which has similar code, and I’ll take a look at that.
On Wednesday, August 11, I released CircuitPython 7.0.0-alpha.6, three weeks after the previous alpha. We are making good progress towards 7.0.0 final but still have a number of issues to fix. I need to finish some API changes to the custom HID device code, and then we can start issuing beta releases.
qrio module I mentioned last week is in the recent alpha release of CircuitPython, and I’ve been working on a guide that introduces how to use it. Next up, I’ll be doing a week of bug-squashing to bring us closer to a stable release of CircutPython 7.
This week I updated the PCF8523 and DS3231 guides to include the STEMMA QT updates to the breakouts. Typically we replace header-only versions with the STEMMA QT versions, but in this case, the originals are still so popular, we added these as new products. So, instead of the guides being updated to be primarily STEMMA QT, they include both versions equally.
I also completed a lot of miscellaneous tasks that came up including PR testing and merging and working through an obtuse CI failure on a different PR.
I’m still working on a MacroPad example that types out common phrases that I use on GitHub for me, but I still haven’t settled on what phrases I want to use. The project includes Fidget Mode, which makes it so the MacroPad stops sending HID so I can fidget with the light up keys without sending errant strings to my computer. I updated Fidget Mode to be on by default, requiring a manual disable by pressing the rotary encoder switch, and enabling automatically after a customizable delay. That way I don’t have to remember to enable it!
This past week was shorter because I was out sick for part of it. I did however finish up my guide on MacroPad Remote Procedure Calls over USB to Control Home Assistant. This goes over using Remote Procedure Calls to have the MacroPad communicate with the desktop and remotely run functions to allow the MacroPad to control things on your network.
This week I’ve continued fixing bugs in CircuitPython for 7.0.0. The two bugs I’ve been working on are tweaking time tracking on the SAMD21 which caused autoreload to break while doing PulseIn and fixing timer reset on the SAMD21 when pwmio isn’t enabled. I’m going to tackle a few more bugs and then switch to expanding the BLE file transfer protocol a little to work better with the iOS files app.
PyConline AU will be held 10-12 September, 2021 – pyconlineau
Kiwi PyCon XI, Ōtautahi Christchurch, 17th, 18th, & 19th of September 2021 and CFP ends July 16th – python.nz.
PyCon India is the largest gathering of Pythonistas in India for the Python programming language. The 13th edition of PyCon India will be taking place online from 17th September to 20th September 2021 – PyCon India 2021.
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.
20210814 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
Open Hardware Summit Chair – Open Source Hardware Association (OSHWA) – Adafruit Jobs Board.
The Adafruit Discord community, where we do all our CircuitPython development in the open, reached over 30,456 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.