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,290 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.
Happy December! Here’s the latest Python for 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. And now the news:
Deep Sleep support coming to ESP32-S2 CircuitPython
Deep Sleep support coming to ESP32-S2 CircuitPython – Adafruit Blog
The Adafruit MagTag was made for “deep sleep”, thanks to the always-on eInk display. Thanks to a new pull request, we’re getting the beginnings of light and deep sleep support. We can get down to 250uA on the MagTag when in deep sleep, which will let the board run for weeks at a time. Check it out and subscribe to the PR to get notifications when it gets merged into main! We are testing it with data from https://covidtracking.com.
Hackster.io also has a current article summarizing the latest on CircuitPython’s deep sleep support on the ESP32-S2 – Hackster.io.
guizero and circuitpyui – a lightweight graphical user interface libraries for Python and CircuitPython
guizero is a Python 3 library for creating simple graphical user interfaces (GUIs) on Linux/Windows/Mac/Raspberry Pi – GitHub.io
If you are looking for a similar concept framework for microcontrollers, see circuitpyui – GitHub.
Developing the NAU7802 24-bit ADC FeatherWing
Testing with a custom NAU7802 24-bit ADC FeatherWing and Stemma-QT connected Clue. Using a device library developed in CircuitPython, it measures up to two load cells connected to the custom FeatherWing. – Twitter.
Developing a CircuitPython 6.0.0 library for the NAU7802 24-bit ADC FeatherWing was a worthwhile educational experience.
A Stock Ticker with CircuitPython
Adafruit is shipping orders!
Adafruit is stocked and shipping orders! Now is the best time to get orders in for your favorite products, including holiday projects and gifts – Adafruit.
News from around the web!
Building a mechatronic tardigrade with Adafruit parts and CircuitPython – Twitter Thread.
Building an RGB Matrix wall display – Twitter.
“My turn on the Adafruit MagTag this week for Crash Space LA DFN Happy Hour. I made stars! CircuitPython” – Twitter.
Bluepad32 – Connect any Bluetooth gamepad to your ESP32 – GitLab
An Airlift coprocessor firmware variation for Bluepad32 – GitHub.
Creating A New PS1 Modchip using an ESP8266 and MicroPython – KChung’s Blog.
MicroPython micro:bit Custom Python Module – Twitter.
10 Python Skills They Don’t Teach in Bootcamp – Towards Data Science.
Introspection in Python: use built-in Python tools to both find out exactly what any module can do, and find out exactly how Python will execute your code – Anvil.
PyDev of the Week: Mridu Bhatnagar on Mouse vs Python
nRF Sniffer for Bluetooth LE – a development tool for Bluetooth LE packet sniffing and learning – Nordic Semiconductors.
Adafruit posts “Our successful Cobbler400 test for attaching Pi Bonnets/PHATs is followed by a dessert…an extra big helping of Cobbler that can show off your favorite HAT like say, a Sense HAT or maybe a PiTFT to show your favorite GIFs” – Twitter
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 was one new board added:
CP Sapling from Oak Development Technologies.
Looking for adding 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 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 281!
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!
This past week I’ve been working with the MLX80395 magnetometer by Melexis; it’s a nice little sensor, similar to the TLV493 as they’re both targeted towards directly sensing magnets as opposed to sensing the earth’s electromagnetic field. These are particularly interesting to me due to the type of interfaces they enable. Being able to sense the distance, rotation and orientation of something (by attaching a magnet to it) without needing direct contact with it is pretty dang cool.
The TLV493 is designed with joysticks in mind, and the MLX90395 is similarly marketed for “contactless” replacements in places where you’d normally see a mechanical switch or potentiometer. I think it’s pretty cool when new doors are opened that change what is possible for all the many places we interact with technology. Buttons still have to be buttons, but when you don’t need to make any physical contact with the “switch”, a lot of the design constraints for how an interface has to work go out the window.
It will likely be quite a while until these types of interfaces are common, as the humble switch and potentiometer aren’t going anywhere anytime soon, due to familiarity, cost, and overall suitability for their intended purpose. With that said, however, I think it won’t be too long before we see them being used more, and likely in entirely different ways and places than the switch and pot.
I have deep sleep working in CircuitPython on the ESP32-S2. The API has gone through several iterations, and has become simpler. I measured the current consumption to confirm it’s really sleeping, using a used Monsoon power meter acquired on eBay, and it’s in the couple of hundred micro-ampere range, as expected for the board. Expect to see this new capability in a beta of CircuitPython 6.1.0 soon.
This week I’ve continued working on I2S audio output for the ESP32S2, which remains a work in progress. I’ve also worked on various bugs and improvements in the core, as well as an upcoming guide using Bluetooth and Blinka on a Raspberry Pi 4.
This week I added another page to the Which CircuitPython Board is Right for You? guide – Beginner Boards. This page is for folks who are new to CircuitPython, microcontrollers or programming in general. There are a lot of CircuitPython compatible boards to choose from and knowing which one is best to start with should prove to be super helpful. Thanks again to Carter for helping out with this page and the rest of the guide.
I started working on a new project. It’s a redo of a MicroPython project, and similar to a previous festive project I did. It will in fact use the same wreath from my previous project, but this time it’s featuring the Adafruit MagTag and a NeoPixel strip. The buttons on the MagTag will activate different LED animations. This guide should be out next week.
This week I wrapped up the work on UDP, with a functional demo of sendto and recvfrom_into, grabbing the time from the global NTP servers. The rest of my week was mostly spent on bugfixes and reviews, including ESP32-S2 pin claiming errors, IDF problems, STM32 I2C sending and receiving, and a new STM32 board, the Thunderpack 1.2. This coming week, I’ll be transitioning back into i.MX territory, to check out some of the modules that never got wrapped up, like PWMOut and AnalogIO. I’ll also be looking into TCP Server and keeping an eye on new ESP32-S2 bugs that come in on the MagTag and other boards.
This past week, I worked on an online ESP Tool some more. One of the challenges I was facing was that the Web Serial streams were converting my bytes into UTF-8 and the ESP32 I was connected to wasn’t responding. I found this out by connecting a logic analyzer up and comparing what I thought I was sending to what I was actually getting at the board level. I had a similar issue with the response. I fixed this by removing the TextEncoderStream and TextDecoderStream classes out of the mix and interacting with the port directly, which was different than most examples I was seeing.
This last week I’ve been doing a number of small improvements to the ESP32-S2 and network related things. For example, I sped up json parsing. On my stream I did a test query that took 111 seconds at the start and afterwards took 3 seconds.
I’ve also got a PR out to tweak how the Adafruit requests library works. It turns out the send method may act like it sent data even when it actually hasn’t (and can’t). So now requests will send everything and check it can read a response before handing off to full response parsing. If it can’t read, it recreates the socket and tries again.
There a few other small things too. If you are an early adopter of the ESP32-S2 and CircuitPython, keep an eye on CircuitPython’s pull requests and make sure to stay update with the latest pre-release, or even the absolute newest build. We’re squashing bugs every day. ??
Women Who Code CONNECT Forward, December 2-4, 2020 online – Women Who Code.
Join educators, researchers, and the developer community for micro:bit LIVE 2020 virtual, an online event December 4-5, 2020. There is no cost to register and attend – Microbit.Org.
PyDay Chile 2020 Conference: December 5, online – pyday.cl.
Virtual Girls Into Coding #6, December 13th: a free event for girls ages 10-14 to explore online coding activities, online robotics, 3D Design, electronics, and physical computing using the BBC micro:bit. This is a fantastic opportunity to use Python (text-based language) and to get some hands-on making time from the comfort of your home – Eventbright.
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. Find details, including ticket and sponsorship information at 2021.oshwa.org – OSHWA.
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.
20201126 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 25,965 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.