View this email in your browser.
Welcome to a special issue of the Python on Microcontrollers newsletter! This issue focuses mainly on the new Raspberry Pi Pico and its RP2040 chip. Many people are using MicroPython and CircuitPython to program this new silicon. Several articles with the developers kick off this issue.
Talk to us! 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 to it!
Discussions on the Raspberry Pi Pico Board and RP2040 Chip from the Designers
Raspberry Pi RP2040: Our Microcontroller for the Masses – Raspberry Pi COO James Adams talks about the first Raspberry Pi custom Arm chip, designed in-house with Arm Flexible Access, and now at the heart of the Raspberry Pi Pico – Arm
Software Engineer Liam Fraser discusses the journey to Raspberry Silicon and the design process for the RP2040 chip – Raspberry Pi Blog.
Innovation Coffee – Raspberry Pi Pico Special by Arm Software Developers – YouTube
A conversation with the Raspberry Pi CPO, Gordon Hollingworth, and Hardware Engineer, Luke Wren. Gordon, Raspberry Pi employee number 1, shares some interesting anecdotes of his time at Raspberry Pi, and Luke walks through the hardware development for the new Raspberry Pi Pico!
The Amp Hour Podcast – Embedded Hardware with the Raspberry Pi Team – theamphour.
The January 2021 Melbourne MicroPython Meetup Featuring Damien George
The January 2021 Melbourne MicroPython Meetup has posted their January videos – Matt Trentini provides a news update and the key speaker is Damien George, who talks about the MicroPython port for the Raspberry Pi Pico – Melbourne MicroPython Meetup
Display a Raspberry Pi Pico overlay in Adafruit AR
Display a Raspberry Pi Pico overlay in Adafruit AR – Adafruit Blog
A new feature in the Adafruit iOS AR app: if you have a Raspberry Pi Pico, you can now scan the board with Adafruit AR’s board scanner to display a pinout and power pin overlay. Now you are able to see your pinouts even if your Raspberry Pi Pico board is on a breadboard!
CircuitPython Deep Dive Stream with Scott Shawcroft
This week, Scott streams his work on RP2040 audio and DMA debugging.
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!
Hands on with the Raspberry Pi Pico and CircuitPython – tinyletter.
CircuitPython performance is pretty good, but a little below the speed of the Adafruit M4, which is a similarly-clocked Cortex M4. The Cortex M0 has no floating-point, so the board must do software floating-point.
Use Adafruit’s CircuitPython on the Raspberry Pi Pico: details, pros and cons – Recantha.co.uk.
Hacking an Alibaba RGB “beauty” ring light: SK6812 + White Rings, using a redesigned controller with a Raspberry Pi Pico and CircuitPython – Twitter Thread.
A LoRa messenger in a BlackBerry form factor with a Feather and CircuitPython – hackaday and MSG.
A Raspberry Pi Pico Soil Moisture Indicator with CircuitPython – Andy Warburton.
Use the screen on the Pimoroni Pico Explorer with CircuitPython – Twitter and GitHub.
Using Tio and Ampy with a Raspberry Pi Pico – bigl.es.
A Raspberry Pi Pico Emulates a Nintendo NES Console – Toms Hardware via Twitter.
Musical note generation using the PIO state machine on the Raspberry Pi Pico using MicroPython – Twitter.
Live-coding Raspberry Pi Pico Emulator – hackaday.io and YouTube.
Also the first disassembler for Raspberry Pi Pico – GitHub.
Blinky! A Raspberry Pi Pico with a Pimoroni RGB keypad programmed in MicroPython – Twitter.
Blonk a NeoPixel Jewel in MicroPython on a Raspberry Pi Pico – pibits.net.
Happy Chinese New Year, Dune style, with CircuitPython and dragons – Twitter.
Pico setup for Windows: Quickly get started with Raspberry Pi Pico/RP2040 (using the C/C++ SDK) on Windows – GitHub via Twitter.
Some Helpful Git Commands: naming things – Dev.
Guido van Rossum posts on Twitter that Jupyter Notebooks in VS Code have been revamped – YouTube via Twitter.
Spyder – the free and open source scientific Python development environment – Spyder.
BitmapFonts – an enormous collection of bitmapped characters for use in spritemap fonts – GitHub.
Mini Zork: A functional adventure game in lisp – GitHub.
A Raspberry Pi Python project that alerts you when your friends are playing Minecraft by Geeksmithing – YouTube.
PyDev of the Week: Bojan Miletic on Mouse vs Python
CircuitPython Weekly Meeting for January 25th, 2021 (notes) and video on Youtube
#ICYDNCI What was the most popular, most clicked link, in last week’s newsletter? LCA 2021 Online Keynote: The Story Behind Blinka by Limor Fried.
Coming soon
Meta Pico is a RP2040 chip on a Raspberry Pi Zero format board – Twitter Thread.
With a microSD slot, Qwiic/Stemma QT connector, a Neopixel, and USB Type-C, this makes a quite usable board, and it’s compatible with many existing RPi Zero HATs! I’m running CircuitPython on it right now.
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, no new boards were added, but several are in development!
Looking to add a new board to CircuitPython? It’s highly encouraged! Adafruit has four guides to help you do so:
New Learn Guides!
Infinity Mirror Collar from Debra Ansell
RGB Matrix Portal Room CO2 Monitor from Carter Nelson
Temperature and Humidity Sensing in Home Assistant with CircuitPython from Melissa LeBlanc-Williams
No-Solder Visualizer Capacitive Touch Controller from John Park
Adafruit SPI Flash SD Card from Kattni
CircuitPython Libraries!
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 297!
New Libraries!
Here’s this week’s new CircuitPython libraries:
Updated 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!
Dan
I’ve been working on adding a second USB serial channel to CircuitPython, so that a board can communicate with a host computer without the REPL getting in the way (ctrl-C), etc. The second channel will simply send and receive raw bytes. I thought we would have to turn off another USB device to make room, but it turns out, for many boards, we have enough USB “endpoints” (communications channels).
A number of our Learn Guide programs use a function called map_range() that is similar to the Arduino map() function. It is defined in the simpleio library, which has a lot of other stuff in it. I created a smaller library called adafruit_simplemath that just defined map_range() and one other related function.
Kattni
This week I published the SPI Flash SD Card guide. This is a nifty little breakout that is essentially a surface-mount SD card hooked up using SPI, but to CircuitPython (and Arduino), it’s simply an SD card. So you can use the current SD library and code with it. The guide has all the info you need to get started, including wiring diagrams and download resources. If you picked up one of these breakouts and want to know more, check out the guide.
I added a new page to the CircuitPython Essentials guide explaining CircuitPython Pins and Modules. This is the first time I cover in a guide how import board works and how CircuitPython knows where to look for the hardware you have connected in your project. I also explain how to find what CircuitPython modules are available for your board. This seems like basic stuff, but while folks constantly use board and other built-in modules in all of their CircuitPython code, it may not be clear to many how it works. This new page aims to clarify.
Next up is a guide for the new Adafruit SHT40, as well as a guide for a coming soon: the ISO1540.
Lucian
This past week I rebuilt my suite of network testing Python sketches, which helped in nailing a number of remaining bugs in the Socket implementation and the Requests library layer above it. I also got started on implementing an interrupt driven approach for the STM32 I2C module, so it works with chips that require a repeated start condition.
Melissa
This past week I worked on Home Assistant in a couple of different ways. First, I set up a sensor node using CircuitPython on the Metro ESP32-S2 to read a temperature and humidity sensor and report the results to Home Assistant. You can check out the guide I wrote titled Temperature and Humidity Sensing in Home Assistant with CircuitPython, though it can be adapted for many other sensors.
The other thing I did was learn about add-ons and I have been researching some ways to integrate an ESP32-S2 board more tightly with Home Assistant using ESPHome. I should have more details in a future update.
Scott
This week I’ve continued working on audio playback on the RP2040. We should be able to do both PWM and I2S playback of raw samples and wav files. I tried to get MP3 going but our existing implementation uses some instructions that are missing from the Cortex-M0+. This is a first pass, so we’ll just leave it disabled for now.
I’ve refactored the code a bit since I first started so I can share most of the DMA setup and buffer conversion between PWM and I2S. It’s compiling and running under the newest version of the pico-sdk but I haven’t actually tested playback. That’ll be my focus tomorrow. Hopefully we’ll get it checked in and released in the next week.
Upcoming events!
On Wednesday February 10, at 8:00 AM (PST), join RISC-V BitManip industry leader Claire Xenia Wolf, chief technology officer and co-founder of YosysHQ along with Dr. James Cuff, independent strategic advisor and former Harvard distinguished engineer for an open and lively discussion with an interactive Q&A on RISC-V including trends and comparisons with the existing architecture landscape including x86 and ARM and what specifically makes RISC-V unique – riscv.org
PyCascades is a regional PyCon in the Pacific Northwest, celebrating the west coast Python developer and user community. Held online February 19th — 21st, 2021 – PyCascades.
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/
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.
Latest releases
CircuitPython’s stable release is 6.1.0 and its unstable release is 6.2.0-beta.1. New to CircuitPython? Start with our Welcome to CircuitPython Guide.
20210206 is the latest CircuitPython library bundle.
v1.14 is the latest MicroPython release. Documentation for it is here.
3.9.1 is the latest Python release. The latest pre-release version is 3.10.0a5.
2,270 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
Executive Director Open Source Initiative (OSI) – Open Source Initiative – Adafruit Jobs Board.
27,307 thanks!
The Adafruit Discord community, where we do all our CircuitPython development in the open, reached over 27,307 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
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.
Visit Codecademy to access the Learn Hardware Programming with CircuitPython course and Adafruit to purchase a Circuit Playground Express.
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.
Contribute!
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.