View this email in your browser.
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!
70 Single Board Computers now support CircuitPython!
Blinka brings CircuitPython APIs and CircuitPython libraries to single board computers (SBCs). It is a pip installable Python library that runs in normal “desktop” Python. One can port their microcontroller code to an SBC or visa versa!
Blinka reached a milestone this week – it now supports 70 different single board computers! – CircuitPython.org.
CircuitPython Subreddit reaches 2,000 members!
The CircuitPython subreddit on Reddit.com crossed the 2,000 members mark! Thank you to our Reddit readers for choosing to get your Python fix on our subreddit – Blog post.
Python Developers Survey 2020 Results
The Python Software Foundation are excited to share the results of the fourth official Python Developers Survey conducted with the help of JetBrains. More than 28,000 Python users from almost 200 countries took part in the survey this past October. With the help of the data collected, they are able to present the summarized results, identify the latest trends, and create a Python developer profile. – Python Software Foundation and JetBrains.
Raspberry Pi turns 9!
The original Raspberry Pi launched on February 29th, 2012, making this low cost single board computer nine years old. It really doesn’t seem that long ago. With 38 million units sold, the Raspberry Pi powers a huge community of makers, students and businesses. What started as a small project, meant to increase applications for Cambridge University’s computer science program, has become a global movement – Tom’s Hardware.
CircuitPython Deep Dive Stream with Scott Shawcroft
This week, Scott streams his work on lots of RP2040 stuff.
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!
John Park streams his build of a Raspberry Pi Pico Mechanical Keyboard Build, programmable in CircuitPython – YouTube.
Debra displays some of her works and discusses how she uses CircuitPython in her creations in this PyCascades presentation – YouTube.
Webinar April 8 – “How to Program a Microcontroller Using CircuitPython” – Twitter and Website.
New LinkedIn Learning course, Learning CircuitPython with Circuit Playground Express is now live – LinkedIn via Twitter.
Galloping Horse Animation on Pi Pico using CircuitPython – YouTube and GitHub.
QT Py USB Media Knob, using a rotary encoder and NeoPixel ring – GitHub and YouTube.
Recent streams from CircuitPythonista FoamyGuy (Tim):
- 2/20/21 covers CircuitPython library pull requests and development of RFM LoRa Radio project – YouTube.
- 2/27/21 covers a few display_text PRs and work on Tiled game map editor file importing for CircuitPython – YouTube.
LED pixels Bitcoin and Crypto live updates – Etsy.
A (very) simple pure MicroPython plotting package – GitHub.
ARM MBed published the results of their 2020 developer survey. Some interesting IoT findings are:
- BLE and cellular are popular among professionals while WiFi is popular among hobbyists
- 50% of companies are increasing their BOM cost to protect against loss control over an IoT device
- Non-professional developers feel the largest challenge is setting up a development environment
Full survey results – mbed.com.
Tom’s Hardware review of Pimoroni Tiny 2040 board – Tom’s Hardware via Twitter.
Color blink running on Pimoroni Tiny 2040 using CircuitPython and MicroPython – Twitter.
Adding a STEMMA QT Connector to a Raspberry Pi Pico to communicate with an Adafruit PCT2075 in CircuitPython – Twitter.
This displays all the readings from an Adafruit Feather nRF52840 Sense on a 3.5” TFT FeatherWing. There are a few groups of readings that can be updated at intervals defined at the start of the script – Twitter.
Conway’s Game of Life on a Pico with a Pimoroni Pico Unicorn Pack – Adafruit Blog.
A KeyBow-mini from Pimoroni controlled from a Raspberry Pi Pico running CircuitPython. The magic come from a Red Robotics Pico 2 Pi adapter – Twitter.
Pico 2 Pi – a small adapter board which gives a Raspberry Pi Pico the format and pinout of a Pi Zero – Tindie.
LCARS style temperature display on MagTag – Twitter.
With the next Adafruit AR update, you’ll be able to display pinout overlays for the Teensy 4.1 and Raspberry Pi Pico at the same time – Twitter.
A full color POV display using Raspberry Pi Pico and DotStar LED tape – Hackster.io via Adafruit Blog.
Playing with Hardware: Learning about Hardware Programming with CircuitPython – Twitch.
A Raspberry Pi Pico MIDI “pack” Interface – DIY Electromusic Blog.
A Raspberry Pi Pico based terminal running MicroPython with VGA video and a USB keyboard – Twitter (Japanese).
A CircuitPython program running on the Cytron Maker Pi Pico to simulate LED drips using PWM, inspired by the Ooze Master 3000. The board has an “LED indicator for convenient code testing and troubleshooting” for each GPIO of the Raspberry Pi Pico, but here they are used for some visual fun with a sample-based sound effect – YouTube.
Learn about Brython, a Python implementation that runs in the browser – Real Python via Twitter.
scikit-rf is an Open Source package for RF/Microwave engineering implemented in the Python programming language – scikit-rf.org and GitHub.
CircuitPython Weekly Meeting for March 1st, 2021 on YouTube (notes)
#ICYDNCI What was the most popular, most clicked link, in last week’s newsletter? Python Programming And Numerical Methods: A Guide For Engineers And Scientists.
The new Adafruit Feather RP2040 is being made and will be out this week – Adafruit.
Olimex posts a RP2040-PICO-PC teaser – it’s a small PC for a RP2040-PICO module. Video, Audio, SD-card, UEXT, I2C, Lipo battery, Reset, USB power, USB host for keyboard, Debug Tx/Rx, SWD for JTAG debug. It’s tagged CircuitPython so hopefully they help ensure compatibility – 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 were 4 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!
MagTag Sports Schedule Viewer from John Park
NeoPIO: Drive lots of LEDs with Raspberry Pi Pico from Jeff Epler
Updated Learn Guides!
Getting Started with Raspberry Pi Pico and CircuitPython from Kattni
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 302!
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 check in!
I finished the secondary USB serial implementation and it was merged.
For the past couple of days, I’ve been working on an idiosyncrasy of the RP2040 I2C hardware: it cannot do zero-length writes, which we use for I2C bus scanning, and for device probing. MicroPython uses its bitbang I2C implementation for such writes. I tried the same thing and discovered an issue with
bitbangio.I2C on our RP2040 port. It turned out to be some glitches caused when changing state in
DigitalInOut. With those fixed,
bitbangio.I2C now works fine, and
busio.I2C.scan() also works. There is still some issue when substituting
bitbangio.I2C for the zero-length writes, and I’m tracking it down.
The guide I mentioned last week, showing how to use the RP2040’s PIO to drive 8 strands of NeoPixels has been published, check it out.
I’ve continued to learn more about the RP2040’s PIO module, beginning to adapt more of the examples to CircuitPython and ultimately create a guide that will serve as an introduction to PIO using CircuitPython.
Some of them, like “Differential Manchester Encoding”, are probably quite interesting to the right person, but not likely to be used by very many people. Others, like uart_rx, can’t be done without some improvements to the core of CircuitPython. We’ll pick and choose what’s most interesting and useful to cover in this guide, so feel free to let me know your opinion on our Discord.
The way many of them work only becomes clear after repeatedly reading the code. This makes me think someone should create a PIO emulator & debugger.
This week I ran into an issue across the libraries with Pylint. Pylint is something we use to make sure all of our code is a standard format. A recent update made a previously ignored check begin working, and the way we write examples triggered the check. So, I needed to change how Pylint is run on the examples so it could still check them for other formatting, but not trigger this specific check. As we were already working on changing the logistics behind how we run Pylint, we decided to bump that process up and do both at once. All kudos goes to @Hugo on Discord for providing the update. Dylan will be running an Adabot patch this week and, once all the libraries are updated, our builds should begin passing again. Thank you to our contributors for their patience while we sorted out the best solution to this issue.
Around sorting out the Pylint issue, I also updated the BMP388 guide for the STEMMA QT revision, and created a couple of Fritzing objects for that and another new product.
This past week I’ve been working on low power on the STM32. Low power states and APIs are something that vary quite a lot between chip vendors – the ESP32, STM32 and Nordic APIs for low power are all quite different, which makes fitting them in the same Alarm module an interesting problem. I’ve been factoring out parts of the STM32 code that were previously packed into other modules, like external pin interrupts in PulseIO and the RTC in Port, so they can now be used for low power purposes. I’m also wrangling with the parts of the ESP32-S2 code that are a little convoluted, like the systems for simulating sleep when USB is connected, and the means by which wakeup alarms are returned from light vs deep sleep.
This past week was both a very busy one for me and a very fun one. First of all, I started off by writing an implementation of the fromisoformat() for the CircuitPython datetime library. The tricky part for this was when I started enabling unit tests. While I originally intended on doing a partial implementation, it turned out that this wasn’t very far from a full implementation, so that’s what I ended up doing.
After that, I wrote my first eInk display driver. The tricky part of writing eInk drivers over TFT drivers is you don’t get much feedback until they are most of the way there. I ended up hooking up a logic analyzer just to make sure the data that was being passed in was good. Once I got it updating, it was usually only a matter of tweaking a few settings to get it to look right. I also updated the gizmo library to work with the new size of display.
Finally I finished up the week with working on the issue with the Mini Pi TFT displays on the Raspberry Pi. I started out with testing some changes to the ST7789 display and ended up updating the driver so that it would do the offsets correctly in the various rotations. One of the tricky parts of these displays is depending on the size, it uses a different part of the display.
I came up with a good way of calculating the offset without a lot of fancy logic. This was also the furthest I’ve gotten into writing a driver and I just need to get everything packaged up and we should have the problem solved soon.
This week I’ve finally got I2SOut and PDMIn ready to merge in along with a number of improvements for the PIO on the RP2040. The PR is here.
I also knocked out a few minor issues on the RP2040 while I was at it. One thing I did was factor out the flash size so that it can vary between boards. (Perfect timing because Pimoroni just merged in definitions for three of their boards.) I’m reviewing PRs for countio and busio.UART on the RP2040. I’m also advising on work to support pulseio.PulseIn (which is used for DHT sensors.)
My next thing is adding rotaryio support which is used for rotary encoders (knobs that can rotate 360+ degrees rather than just over a range.)
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.
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.
CircuitPython’s stable release is 6.1.0 and its unstable release is 6.2.0-beta.2. New to CircuitPython? Start with our Welcome to CircuitPython Guide.
20210227 is the latest CircuitPython library bundle.
v1.14 is the latest MicroPython release. Documentation for it is here.
3.9.2 is the latest Python release. The latest pre-release version is 3.10.0a6.
2,310 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, Microcenter, Raspberry Pi and more.
Job of the Week
– Adafruit Jobs Board.
The Adafruit Discord community, where we do all our CircuitPython development in the open, reached over 27,793 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.