View this email in your browser.
Presented for your reading enjoyment: the latest chonky goodness that is the 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.
Python snakes its way to the new Texas Instruments TI-84 Plus CE Python Graphing Calculator running a CircuitPython fork!
The new TI-84 Plus CE Python Graphing Calculator by Texas Instruments runs a private CircuitPython fork!
THIS LINK goes to the USA site and it says you can sign up for alerts (but not purchase yet?) and THIS LINK goes to the UK site and it’s available for purchase.
Read more and follow developments as they are known – Adafruit Blog
hackster.io News discusses the TI-84 Plus CE Python calculator, CircuitPython, and available modules – hackster.io.
More Coverage of Using CircuitPython Drivers on MicroPython on the Raspberry Pi Pico
More coverage of the headline in the last newsletter on using CircuitPython drivers on MicroPython on the Raspberry Pi Pico:
CircuitPython Libraries Slither Into MicroPython on the Raspberry Pi Pico – Tom’s Hardware.
Mix both MicroPython and CircuitPython code in the same file on a Raspberry Pi Pico with Blinka – YouTube and Twitter.
Pimoroni has baked in CircuitPython Blinka and PlatformDetect libraries into their MicroPython helper library – GitHub and Twitter Thread.
Disable CircuitPython USB devices in boot.py
With the upcoming CircuitPython version 7.x, you’ll be able to selectively disable the many USB devices it creates (e.g. CIRCUITPY flash drive & USB serial).
Read more in the new guide Customizing USB Devices in CircuitPython and via the Adafruit Blog.
Example code by Tod Kurt – Twitter and GitHub.
Adafruit Squeezes the Power of the RP2040 Into a USB key
On the Desk of Ladyada, Limor discusses development of the Adafruit Trinkey RP2040 with QT connector – YouTube.
We’ve wanted to have something that plugs into a USB A port and provides a QT port for a while. But since we want it to support any and all QT boards, we need more RAM and storage than the SAMD21 can provide. We probably cannot buy any SAMD51 microcontrollers for like a year – but the RP2040 is a good option! Lots of RAM and we stuck an 8MB flash on there. The idea is you can attach a QT sensor or whatever on top with some nylon standoffs, maybe it will even auto-detect which sensors are plugged in! We made the boot button a user-button too, thanks to a li’l diode friend.
Also, Tom’s Hardware reviews the Adafruit QT 2040 Trinkey – Tom’s Hardware
Arduino Nano RP2040 Connect Now Runs CircuitPython
Liz (@BlitzCityDIY) submitted a PR to add support for the Arduino Nano RP2040 Connect to CircuitPython! So far so good, the digital pins all toggle right and see the built in LSM6DSOX chip on the I2C port. There is a driver for this IMU, so the video has quick demo: an external OLED wired up on the same I2C bus, reading acceleration/gyro data and displaying it – YouTube
The Python Software Foundation News
Second Quarter 2021 Fundraiser
PyLadies Brazil co-founder, Débora Azevedo, can capture her feelings about our Python community in one word: Belonging – Python.org.
Débora stumbled upon her love for programming accidentally. “I pursued a computer networking course because I didn’t want to code,” she said. “But when I learned Python, I had this empowered feeling that I could really build something.”
Thanks to community support, the PSF has provided more than 651 PyCon scholarships and travel grants to community members, like Débora, and $2,804,281 in grants to Python projects across 91 countries, over the past twenty years.
You made this possible. You built this incredible community and sustained it for more than twenty years. You helped us come this far. To continue this growth, The Python Software Foundation needs your help raising $80,000 by June 12th. Giving: Python Software Foundation
The 2021 Python Language Summit: Lightning Talks, Round 1
The first day of the 2021 Python Language Summit finished with a series of lightning talks from Petr Viktorin, Lorena Mesa, Scott Shawcroft, and Jeff Allen.
CircuitPython is a much smaller version of Python that runs on microcontrollers. Scott Shawcroft compared what’s included in CircuitPython and CPython to give a sense of what is central to users’ experience of Python. Read more – PSF Blog.
CircuitPython Deep Dive Stream with Scott Shawcroft
This week, Scott streams his work on BLE workflow.
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!
Testing the AMG8833 thermal camera CircuitPython code on the Adafruit FunHouse. Interested to see if the ESP32-S2 speed and memory capacity will allow upscaling the 8×8 sensor array beyond the current 2x bilinear interpolation whilst maintaining a reasonable frame rate – Twitter.
@CedarGrove also looks at the display speed on a range of Adafruit microcontroller boards with displays, both with standard and maximum I2C clocks. The Adafruit PyBadge comes out on top! – Twitter.
KMK is a feature-rich and beginner-friendly firmware for computer keyboards written and configured in CircuitPython – GitHub.
The Goji Keeb is a keyboard based on a Raspberry Pi Pico and Lily58 Pro design. The PCB is reversible and supports Cherry MX / Kailh Switch Choc switches and sockets. It is designed to support a Pimoroni Display Pack as optional addon. It uses the KMK firmware above – Twitter.
Thea at Winterbloom: The tools and tech I use to run a one-woman hardware company – Thea’s Blog.
The Make: Boards Guide Reviews the Adafruit Funhouse – Makezine.
The May 14th Microsoft Reactor Q&A with Guido van Rossum, Inventor of Python – YouTube.
Derek Banas’s jam-packed CircuitPython tutorial video featuring 15 real world projects using the Circuit Playground Express, Circuit Playground Bluefruit, Adafruit Crickit, Gizmo Display, ultrasonic sensors, IR remotes, servos, motors, NeoPixels and numerous sensors – YouTube.
A CircuitPython program running on an Adafruit CLUE with four passive components replicating the “octopus circuit” from the component tester (found on oscilloscopes) to identify passive components – YouTube.
Sharing the same shield using a Raspberry Pi Zero and the new ATMegaZero ESP32-S2, communicating via MQTT – Twitter.
SAM-ISM: Born of a desire for a tiny dev board with integrated packet radio, SAM-ISM carries a RFM69 module on its back and a 915MHz antenna on its side. And it runs CircuitPython – Twitter.
CircuitPython BLE MIDI on Windows – ElectroMaker.
Data Encryption with ATECC608A and CircuitPython – hackster.io.
Elecia White gave a talk at the Embedded Online Conference 2021 about how to use memory map files. The talk includes looking at the memory map for CircuitPython on a SAMD21 processor – embedded.fm.
CircuitPython is my “go to” for teaching people how to program. I have had so many friends that want to learn how to program, and they always want to learn something “useful” like React first, because that’s what people are using at work. But, you have to crawl before you can walk, and the simplicity of a computer without an OS or complicated libraries is a great place to start. Make a light blink. If button is pressed, turn a light on. And before you know it, you can press buttons and have music play, or send a tweet to Twitter, etc… I like the Circuit Playground (Express) for getting started: It has a lot you can do without attaching external devices – Adafruit Blog and Hacker News.
A Dog Food Timer – Twitter.
The code for this project was ported from Arduino to CircuitPython. I wasn’t happy with the button logic until I found that the CircuitPlayground module will return all debounced-as-pressed buttons as a set. This gives me exactly one function call per button click.
Create a macro keyboard for Minecraft with RP2040 and CircuitPython – Akii Diary, Twitter and YouTube (Japanese).
DJI releases a new, smarter, Robomaster Tello Talent drone. The $239 drone has an ESP32 microcontroller board to provide Arduino and MicroPython open-source coding platforms – DroneDJ.
Build a Mute/Unmute Button for your Video Calls with a Raspberry Pi Pico and MicroPython – Twilio Blog.
Embedded Python: Build a Game on the BBC micro:bit – Real Python
minipip: a tool for installing distribution packages for MicroPython and CircuitPython – GitHub and Adafruit Forums.
updizombie: Controlling 0/1-series AVRs live via Python. Imagine running python code on a microcontroller without actually running the code on the microcontroller. No compiling, no memory limits, just UART – GitHub and YouTube.
Python Portable is a portable version of Python / Spyder for Windows. Modules installed include Matplotlib, Pandas, Numpy, Sympy, Scipy, Cython, QtPy, Qtconsole and more. All files reside in a single folder, nothing is written to system files/registry, delete by deleting the install folder – portabledevapps.
Build a Bulk File Rename Tool With Python and PyQt – Real Python.
Handling exceptions in Python like a pro – Latrova.
Flat Data – Flat explores how to make it easy to work with data in git and GitHub. It builds on the “git scraping” approach pioneered by Simon Willison to offer a simple pattern for bringing working datasets into your repositories and versioning them, because developing against local datasets is faster and easier than working with data over the wire – GitHub.
Floppinux – An Embedded Linux on a Single Floppy – bits.p1x.in.
How Open Source is Fueling Space Exploration – CXO Today.
Carol Willing, a core contributor to Python. “That’s one of the beauties of open source; someone else can take your good work and make it even more powerful and meaningful.”
Linus Åkesson’s Music For Microcontrollers from 2007–2010 has been resynthesized in high fidelity. Enjoy crisp alias-free renditions of these songs on your favourite streaming music platform, or grab the mp3 files! – linusakesson.net.
PyDev of the Week: Cooper Lees from Mouse vs Python
CircuitPython Weekly Meeting for May 24th, 2021 on YouTube and notes
#ICYDNCI What was the most popular, most clicked link, in last week’s newsletter? New book out: Programming Microcontrollers with Python.
Ladyada respins the STEMMA Friend design from a SAMD21 to use an RP2040 to take advantage of the more-powerful chip, to make it CircuitPython-friendlier and faster at doing stuff like I2C sniffing. While porting over the Arduino code (which pretty much works just fine), she noticed the display was a little sluggish due to SPI data being sent over one byte at a time with a delay. So she added a bulk-transfer SPI function to the Philhower RP2040 core to take advantage of the pico-sdk’s buffered writes – it’s now 10x faster! – 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 2 new boards added!
Looking to add a new board to CircuitPython? It’s highly encouraged! Adafruit has four guides to help you do so:
New Learn Guides!
CircuitPython Libraries on MicroPython using the Raspberry Pi Pico from Melissa LeBlanc-Williams
Pet Bowl Water Level Sensing from Melissa LeBlanc-Williams
Raspberry Pi Low-Light Long-Exposure Photography from Phil Moyer
Adabox 018 from John Park
Customizing USB Devices in CircuitPython from Dan Halbert
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!
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 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 314!
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!
We have seen some RP2040 boards not be able to start CircuitPython from a power-cycle. Scott and I brainstormed on this, looking at Saleae traces of communication with the flash chip. This problem appears to be due to the crystal oscillator taking longer to start than expected, and I have a fix for that.
MacOS on the M1 does not return information about USB devices in the same way that MacOS on older Macs does. This caused the Mu beta not to be able to detect CircuitPython boards on M1 Macs. Neradoc came up with a fix for this, and I tested it on an M1 Mac and submitted a change to Mu to incorporate the fix.
I just finished a guide about Customized USB Devices in CircuitPython, which documents how to use the dynamic USB descriptor capability I added recently.
Last week I attended PyCon – talks will be available on YouTube soon, if they’re not already. I also hosted CircuitPython Development Sprints. Things were entirely virtual this year which made my usual way of doing things a bit more difficult. A couple of folks who already had CircuitPython-compatible hardware joined me and we had a great time, so it in the end it was worth it. I enjoyed diving into code which I haven’t had a chance to do in a long time.
Earlier last week, I started the guide for the NeoKey Trinkey (which should be published by now). Later in the week, I started the guide for the Rotary Trinkey as well.
I helped Dylan get an Adabot patch going to add a feature to library PRs wherein GitHub displays a message linking to the Pylint/Black guide if your PR fails Pylint or Black. As well, we’re adding a template to PRs with links to that guide, and the CircuitPython Design Guide to hopefully help folks before they submit the PR.
This past week I merged in a number of the new structural changes for Alarm that have been in the works for a while, as well as getting the new STM32 Alarm module added into main. As the work on sleep finally wraps up, I’ve been taking power profiles of the various ports using the Monsoon and Nordic PPK2 power monitors.
Measuring the low-power performance of chips on dev boards that aren’t specifically specialized for long battery life is an imperfect process – there are many parasitic components on the average dev board that can draw current over time, and without specific power saving hardware in place, there’s no way to prevent them from shortening a device’s battery life even when the MCU core is totally turned off. But I was encouraged to find that even on baseline Feather boards, all ports can hit hundreds of hours of battery life for an average Lipo using Deep Sleep, and power-optimized boards with a couple of AAA batteries can extend over a year, which is desirable for projects like environmental sensors and other isolated data logging devices.
I’m also reviewing and testing other upcoming power centric features, such as the changes to Status LED that Scott has been working on (which will reduce the draw from LED use after executing, while sleeping, and while using the REPL), and the upcoming Alarm module for the RP2040.
This past week, I finished up my Pet Water Bowl sensor guide for the FunHouse. This one was a little tricky because if there’s constant current running through the board, the traces will start to oxidize which affects the readings. I got around this by using a GPIO pin on a second port on the FunHouse to send power to the Water Sensor and was able to control when it was on. You can check out the guide.
I also wrote another guide. This one is about running Blinka and CircuitPython libraries over MicroPython on the Raspberry Pi Pico. It goes over setting everything up using the Thonny editor. Due to the limited space, I cover how to copy everything manually, but am hoping to streamline the process even more. The guide ended up being more popular than I expected. You can see the guide here.
This last week I’ve been wrapping up the status LED changes. It’s very close to done and I fixed safe mode on the RP2040 along the way. Next, I’m dusting off the cobwebs from my previous attempt at BLE workflow. Antonio did an awesome test app last week that works with the prototype implementation, so I’m excited to hook it up to the real thing. The protocol is documented here.
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/
PyOhio is a free event on July 31, 2021- PyOhio.org via Twitter.
Call for proposals for PyConline AU 2021 runs until June 10th, 2021 with the event held 10-12 September, 2021 – pyconlineau
Send Your Events In
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 or send to cpnews(at)adafruit(dot)com.
CircuitPython’s stable release is 6.2.0. New to CircuitPython? Start with our Welcome to CircuitPython Guide.
20210522 is the latest CircuitPython library bundle.
v1.15 is the latest MicroPython release. Documentation for it is here.
3.9.5 is the latest Python release. The latest pre-release version is 3.10.0b1.
2,445 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
Full-Time Lecturer position in Embedded Systems Design, University of Massachusetts Dartmouth – Adafruit Jobs Board.
The Adafruit Discord community, where we do all our CircuitPython development in the open, reached over 29,271 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.
This video podcast is on iTunes, YouTube, IGTV (Instagram TV), and XML.
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.
Join our Discord or post to the forum for any further questions.