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,795 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 6.2.0 released!
CircuitPython 6.2.0 stable has been released! This is a new stable release of CircuitPython. Thank you to all of our amazing contributors!
Fixes since 6.2.0 beta 4 include:
displayio.Palette.is_transparent(palette_index). #4426. Thanks @kmatch98.
- Add uniform
board.LEDpin names for several boards. More later. #4421. Thanks @kattni.
bitmaptools.arrayblit(). #4403. Thanks @jepler.
- Disable usb_cdc, the second USB serial port, by default. it was on by default in 6.2.0-beta.3. It is still available to use in a custom build. #4384. Thanks @dhalbert.
- Save ~1500 bytes of firmware space via slight changes in vm execution with a minor speed penalty. #4344. Thanks @jepler.
set_pixelfor use in
bitmap_tools. #4357. Thanks @kmatch98.
- Update TinyUSB. #4327. Thanks @hathach.
- Fix regression of TinyUSB version. #4365. Thanks @tannewt.
- Fix incorrect 16-bit signedness in
displayio.TileGrid. #4287. Thanks @deshipu.
Board and port specific changes include:
- Fix wifi and I2C interfering with each other. #4387. Thanks @dhalbert.
displayio.ParallelBus. #4130. Thanks @gamblor21.
rotaryio. #4329. Thanks @jepler.
audiomp3; it works at low bit rates. #4380. Thanks @jepler.
- Add all modules enabled in STM32F405 to STM32F407. #4385. Thanks @hierophect.
UART.deinit(). #4383. Thanks @hierophect.
And so much more!
Open Hardware Summit streams this week!
The 2021 Open Hardware summit will be held online, Friday April 9, 2021. The summit will be livestreamed, but ticket holders will have access to additional interactive portions of the summit like meet-and-greets, workshops, and sponsor booths. 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. Find details, including ticket and sponsorship information at 2021.oshwa.org – OSHWA.
CircuitPython Deep Dive Stream with Scott Shawcroft
This week, Scott streams his work on Bluetooth Low Energy (BLE).
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!
A plethora of CircuitPython keyboards and macro pads – Reddit.
Using the Dazzler and Gameduino CircuitPython to create a sprite animation – Tiny Letter.
How to use CircuitPython with GPIO pins on a PC – Tom’s Hardware.
Raspberry Pi Pico macro pad – jmdawson.co.uk.
Circuit Playground ambient weather temperature reactive orb – Adafruit Forum.
Raspberry Pi Pico microcontroller introduction, including a comparison with the Raspberry Pi Zero, installing MicroPython, and a demonstration controlling LEDs – YouTube.
TurtlePlotBot is a MicroPython-powered 3D printed drawing robot – Hackaday.
A Pico-based CO2 sensor carrier board with display – Tindie.
Emulating the Small-Scale Experimental Machine (SSEM) currently housed at the Manchester Science and Industry Museum using CircuitPython – Twitter.
Learning Python as a method to change a bios password – Hackaday.
LumiCube comes with 192 LEDs, loads of sensors, and can be programmed using Python – Hackster.
Pico projects for beginners, in MicroPython – Hackster.
Using Sublime Text 3 to code with your Raspberry Pi Pico – Recantha.
Using CircuitPython to produce audio on a MeowBit (Russian) – PVSM.
Slides from the March 2021 Melbourne MicroPython Meetup – Google Docs.
Awesome CircuitPython list updated with new book in French: An introduction to CircuitPython and the nRF54840 – CircuitPython.org.
HPy provides a new API for extending Python in C – HPy Project.
Crossbars in CuFlow: using Python to draw PCB layouts – excamera.
Raspberry Pi Pico tutorial using MicroPython – Hackster.
Graphics routines for Raspberry Pi Pico screens – Raspberry Pi.
Introduction to RP2040 and Raspberry Pi Pico – smist09 WordPress.
A Python-powered smart chess board that allows for local or online play – Hackster.
Raspberry Pi car dashboard pulls and plots ODB-II data using Python – Hackster.
Using Python as an AI-free way to catch wildlife on camera – Hackaday.
Create a Google Map heatmap with cellular and GPS data acquired by a Raspberry Pi Pico and Notecard, using Python and Google Cloud Platform – Hackster.
This video gives you a first look at the Feather RP2040 board from Adafruit. This board is a great alternative to the Raspberry Pi Pico for projects where you need some extra features! – Youtube.
LED-lit CircuitPython-powered sneakers – Twitter.
Detroit Become Human cosplay with flexible PCBs and CircuitPython – Altium.
Art, games and more using Raspberry Pi and Python – Hackster.
Zelda Breath of the Wild Guardian Sword prop running CircuitPython – Twitter.
CircuitPython running on an ESP-12K development board – Twitter.
Proof-of-concept Bluetooth macro pad running CircuitPython – Twitter.
Controlling volume with a rotary encoder using CircuitPython – Twitter.
The Obsidian ESP32 works great with MicroPython and allows for using Raspberry Pi HATs – Crowd Supply.
GPS receiver using MicroPython and Raspberry Pi Pico – Twitter.
First time soldering and programming the Raspberry Pi Pico in MicroPython – Twitter.
Building a C02 sensor using CircuitPython, and plotting the results – Twitter.
OrderedDict vs dict in Python: the right tool for the job – Real Python.
Understanding list comprehensions in Python – Real Python.
Records and sets: selecting the ideal data structure in Python – Real Python.
Showing off the Pico 2 Pi adapter by RedRobotics – Twitter.
What is the switch-case equivalent in Python? – Päkstech.
Lunatic Python is a two-way bridge between Lua and Python – Labix.
MagTag moon phase tracker – GitHub.
The HSM4 is a hardware security module with embedded Linux in mind — and a Raspberry Pi and NVIDIA Jetson development kit – Hackster.
Raspberry Pi Pico Orange-Python machine boots straight to MicroPython – Tom’s Hardware.
Machine learning with RP2040 – YouTube.
Trying out Arduino Core for Pico on the Feather RP2040 – YouTube.
Adafruit demos the QT Py RP2040 – Tom’s Hardware.
A 5-point framework for Python performance management – Medium.
Making lunch faster with Python concurrency: a lunchtime story to demonstrate threading, asyncio, multiprocessing & cloud functions – sourcery.ai.
Google’s copying of the Java SE API was fair use – Adafruit Blog.
PyDev of the Week: Ngazetungue Muheue on Mouse vs 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.
There were no new boards added this week, but we have a number in the works!
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!
Updated Learn Guides!
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 309!
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 released the first release candidate for CircuitPython 6.2.0 early in the morning of April 1. Perhaps by the time you read this, 6.2.0 stable will be out.
Previously, some I2C devices were not working on the RP2040. There were multiple causes for this, and finally a joint effort of several of us inside and outside of Adafruit solved the problem completely. The pico-sdk code was not respecting a certain time interval defined in the I2C specification. Most devices tolerated a shorter interval, but a few did not. This has been fixed in CircuitPython and is being fixed in the upstream pico-sdk repo as well.
For CircuitPython 7.0.0, I’ll be working on dynamic USB descriptors, so that you don’t have to build a custom version of CircuitPython to add or remove a USB or USB HID device. I hope to be able this support both general-purpose and still make it small enough to fit onto our smallest boards, which are often used to build HID-based gadgets.
My work continues to be on the RT1011 board. We’ve ironed out the problems we’re aware of with SPI, and even enabled the micro SD card on the Teensy 4.1 to work (albeit with the slow
bitbangio version of SPI). Currently, I’m working on PWM, which has only been incompletely implemented so far.
First solo newsletter was deployed successfully! I hope you enjoyed it.
This week, I have been primarily working on templating the CircuitPython Essentials guide. As previously explained, the goal is to recreate the guide as templates that can be tailored to each board, and then include them in every Adafruit CircuitPython-compatible board guide. This will make the experience for folks who are new to CircuitPython much smoother, as, instead of a general page explaining a concept, each page included in the guide will be specific to the board.
Other than that, I went through my todo list and finished up a number of things that had been forgotten along the way. At the moment, I’m caught up on that front.
This past week, I’ve been working on the last bugs of the STM32 and NRF low power implementations, tracking down why specific hard crashes occur when retrieving alarms after sleep. I’ve also been transitioning into the RP2040, setting up the basics for the deep sleep implementation on that platform. And having now worked through low power once, there are some elements of the program flow I’d hoping to change across all ports, things like comment cleanup and renaming to help with future maintainability.
This week I got the Dynamic Bundler completely working. I got past the CORS issue I was having by automatically uploading all of the release assets to Amazon S3 and adding a CORS header. You can take a look at the Dynamic Bundler by visiting the GitHub repo. There you’ll find usage instructions and the URL to access it.
The other major project that I worked on this week was setting up my Development Environment and learning TypeScript enough to fix an issue with the Visual Studio Code extension for CircuitPython. A library that was added a month ago broke the extension because it was structured a bit different than the extension was expecting and I updated the code to deal with the new structure better. you can check out the extension in the Visual Studio Marketplace.
This week I’ve switched the RP2040 and the generic external flash controller in CircuitPython to using nvm.toml. As a result, the flash chip-specific configuration is now shared. The last remaining thing is to switch the iMX RT (think Teensy 4.x) to the flash configuration. It’s lower on my list so it’ll come at a later date.
My higher priority now is getting the individual BLE workflow components sketched out. Getting the initial workflow components going will allow us to start exploring and experimenting the phone app side. We’ll have initial CircuitPython implementations up soon that folks can experiment with and will make it easy to evolve the protocols.
The online GeoPython conference is focused on Python and Geo, its toolkits and applications. April 22-23, 2021 – https://2021.geopython.net/.
PyCon US, the annual official annual Python gathering, has been announced to be held online May 12-15, 2021. Sprints will be held May 16-18, 2021. More information and signups at https://us.pycon.org/2021/
EuroPython, the largest conference for the Python programming language in Europe, has been announced to be held online July 26 – August 1, 2021. More information at https://ep2021.europython.eu/
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.
20210405 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, Microcenter, Raspberry Pi and more.
The Adafruit Discord community, where we do all our CircuitPython development in the open, reached over 28439 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
Codecademy “Learn Hardware Programming with CircuitPython”
Codecademy, an online interactive learning platform used by more than 45 million people, has teamed up with the leading manufacturer in STEAM electronics, Adafruit Industries, to create a coding course, “Learn Hardware Programming with CircuitPython”. The course is now available in the Codecademy catalog.
Python is a highly versatile, easy to learn programming language that a wide range of people, from visual effects artists in Hollywood to mission control at NASA, use to quickly solve problems. But you don’t need to be a rocket scientist to accomplish amazing things with it. This new course introduces programmers to Python by way of a microcontroller — CircuitPython — which is a Python-based programming language optimized for use on hardware.
CircuitPython’s hardware-ready design makes it easier than ever to program a variety of single-board computers, and this course gets you from no experience to working prototype faster than ever before. Codecademy’s interactive learning environment, combined with Adafruit’s highly rated Circuit Playground Express, present aspiring hardware hackers with a never-before-seen opportunity to learn hardware programming seamlessly online.
Whether for those who are new to programming, or for those who want to expand their skill set to include physical computing, this course will have students getting familiar with Python and creating incredible projects along the way. By the end, students will have built their own bike lights, drum machine, and even a moisture detector that can tell when it’s time to water a plant.
Codecademy has helped more than 45 million people around the world upgrade their careers with technology skills. The company’s online interactive learning platform is widely recognized for providing an accessible, flexible, and engaging experience for beginners and experienced programmers alike. Codecademy has raised a total of $43 million from investors including Union Square Ventures, Kleiner Perkins, Index Ventures, Thrive Capital, Naspers, Yuri Milner and Richard Branson, most recently raising its $30 million Series C in July 2016.
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.