Daily tips and tricks from the experts at Adafruit!
View this email in your browser

View this email in your browser.

Today we have a huge issue of the 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.

CircuitPython snakes its way to the new Raspberry Pi Pico board and RP2040 chip

Pico

RP2040 Chip

On January 21st, the Raspberry Pi Foundation launched their first microcontroller-class product: the Raspberry Pi Pico. Priced at just $4, it is built using the RP2040, a brand-new microcontroller chip developed by Raspberry Pi. That’s not a typo. All Raspberry Pi boards to date have been single board computers (SBC) running Linux. The RP2040 and Pico board run code on the chip with no operating system.

Besides the Pico board (yes, many other boards in the market are also named Pico…), several other manufacturers have announced boards based on the RP2040 chip, which will be on sale by itself in the second quarter of this year. Adafruit and other manufacturers have announced new boards using the chip (see below).

The Pico board launched with support for programming in C, MicroPython, and CircuitPython (see below). Arduino has stated they will support the RP2040 soon.

More Information on the Pico board and the RP2040 microcontroller:

  • Ladyada discusses the new Pico board and the RP2040 chip on launch morning – YouTube
  • Desk of Ladyada – It’s an RP2040 & Pico Party! – YouTube.
  • Raspberry Pi Information and video – Raspberry Pi Blog.
  • HackSpace Magazine feature on the Pico – HackSpace Magazine.
  • Getting Started Designing a RP2040 Board – Adafruit Blog

CircuitPython 6.2.0 Beta 0 out with support for RP2040 boards

CircuitPython 6.2.0 Beta 0

CircuitPython 6.2.0 Beta 0 provides preliminary support for the Raspberry Pi RP2040 chip, including the Raspberry Pi Pico and Adafruit’s own RP2040 boards – Adafruit Blog.

Port-specific changes:

  • ESP32-S2:
    • Add TCP Server support.
    • Improve wifi checking about whether already connected when trying to connect.
    • Do not go into safe mode on watchdog reset.
    • Initialize touch in proper order. Fixes TouchIn and TouchAlarm.
    • Revert FeatherS2 status DotStar due to LDO2 issues.
  • STM32 BlackPill: Add additional board build that supports an external SPI chip.
  • ItsyBitsy M4: Fix erroneous comment in mpconfigboard.h.
  • RP2040:
    • Initial port of CircuitPython to the RP2040.
    • Enable longints.

New Adafruit Learning System Guide: Getting Started with Raspberry Pi Pico and CircuitPython.

CircuitPython lead Scott Shawcroft posts on the Raspberry Pi forums on CircuitPython for RP2040 – Raspberry Pi Forums.

CircuitPython from Adafruit runs on the Raspberry Pi Pico – Recantha.co.uk.

CircuitPython Projects on Pico

CircuitPython 6.2.0 Use

CircuitPython on Raspberry Pi Pico took me about 2 minutes to download, find a micro USB lead and get to the REPL! Awesome! – Twitter.

CircuitPython 6.2.0 Keyboard

A Pimoroni Pico Keypad running the LEDs with Adafruit’s DotStar CircuitPython library. CircuitPython works a treat! – Twitter.

CircuitPython 6.2.0 Soundboard

An Arnie soundboard seems like the optimal use of the Pimoroni/Raspberry Pi Pico RGB Keypad. Run my MIDI keypad CircuitPython example, stick a load of Arnie clips on an Ableton drum rack, and BOOM – Twitter.

MicroPython on the Raspberry Pi Pico

MicroPython on Pico

MicroPython is one of the two languages the Raspberry Pi Foundation picked to program the Pico at launch (non-Arduino C being the other). Here are some resources for using MicroPython on Pico:

Raspberry Pi Pico Getting Started Guide – Raspberry Pi.

MicroPython Wiki – GitHub.

MicroPython on Pico Book

There is an official guide book, “Get started with MicroPython on Raspberry Pi Pico”. The book teaches the basics of MicroPython and physical computing, connecting your Pico to displays and sensors, and building alarms, reaction games and more – Raspberry Pi.

MicroPython Projects Using Pico

MicroPython Joystick

Connect an analog joystick to Raspberry Pi Pico with MicroPython – Tom’s Hardware via Twitter.

MicroPython Counter

4-bit binary counter with the Raspberry Pi Pico and MicroPython – Twitter.

New Adafruit Boards Coming, featuring the RP2040 Chip

Adafruit is hard at work developing boards containing the new Raspberry Pi RP2040 microcontroller! There have been ‘coming soon’ announcements for three boards and a novel Pico to Raspberry Pi Zero form factor conversion board. For the Feather and the ItsyBitsy, you can click the link and sign up to be notified first when they are in stock.

Feather RP2040

Feather RP2040: A Feather format board with the RP2040 – Adafruit.

ItsyBitsy RP2040

ItsyBitsy RP2040: An ItsyBitsy format board with the RP2040 – Adafruit.

QT Py RP2040

QT Py RP2040 – Adafruit Blog

Pico Zero

Pico Zero: A Pico-based carrier board in a Raspberry Pi Zero form factor – Adafruit Blog.

CircuitPython Deep Dive Stream with Scott Shawcroft

Deep Dive with Scott

This week, Scott streams his work on the RP2040 and the Raspberry Pi Pico, including programming and PIO.

You can see the latest video and past videos on the Adafruit YouTube channel under the Deep Dive playlist – YouTube.

Hackaday IO Hack Chat this Wednesday: 6 months with ESP32-S2 and the new RP2040

Hack Chat

The gang from Adafruit will host the Hackaday.io Hack Chat on Wednesday, January 27, 2021 at noon Pacific Time!

Topics: Six Months with the ESP32-S2 Hack Chat. Plus: an inside look at the new RP2040!

You’ll need to join Hackaday.io as a member to join the event. More – hackaday.io.

V-R3x: CubeSat mission just launched to space with CircuitPython!

CubeSats

Transporter-1

The V-R3x mission uses a swarm of three small satellites to demonstrate new technologies and techniques for radio networking and navigation. Using three satellites known as CubeSats, each about the size of a coffee mug, the mission will conduct a series of demonstrations. They launched this past Sunday aboard a SpaceX Falcon 9 rocket as a part of the Transporter-1 mission, which launched 140 additional satellites, the most satellites ever launched aboard one spacecraft. The V-R3x CubeSats contain PyCubed boards programmed in CircuitPython.

Launch

Editors Note: I watched Transporter-1 launch Sunday morning, a beautiful polar trajectory over the house. Fabulous.

See the launch – YouTube.

News from around the web!

Weather station monitor

An updated weather station monitor to the Adafruit MagTag and CircuitPython – Twitter.

Moving it (to CircuitPython) let me easily add in graphics and future forecast updates. While this is all possible on Arduino, the speed of doing it in CircuitPython is amazing. And yes it is currently that cold.

Fiber-optic hyperbolic paraboloid

A colorful fiber-optic hyperbolic paraboloid. Light patterns coded in CircuitPython on a Teensy 4.0Twitter.

Covid Display with MagTag

Adafruit MagTag displaying State level Covid numbers via WiFi, programmed in CircuitPython – Twitter.

SAMD21 Boards for Keyboards

Little SAMD21 boards for CircuitPython that are compatible with an Arduino Pro Micro footprint. They are very handy for DIY keyboards – Reddit.

BYO (Build Your Own) Mechanical Keyboard

BYO (Build Your Own) Mechanical Keyboard, includes an Adafruit ItsyBitsy M0 Express board programmable in CircuitPython – Kickstarter.

Wireless keyboard

A wireless keyboard that runs on CircuitPython – Twitter.

PyCorder LCARS Demo

Joey Castillo was on Adafruit Show & Tell last Wednesday with the latest Pycorder demo: an LCARS-inspired environment board – Twitter.

These Sharp memory displays may be one-bit, but even simple dithering looks gorgeous. And of course the code is CircuitPython.

Dashboard

A dashboard for Euro Truck Simulator 2, which not only controls the game, but receives real time game data. Uses a Pimoroni four letter pHat and an Adafruit ClueTwitter.

Foamyguy streams

CircuitPython community member @foamyguy has started streaming CircuitPython library PR reviews and development. New streams are on Saturdays at 10am US Central, 16:00 UTC. Join on Twitch and the #livebroadcast channel on the Adafruit Discord Server – Past videos on Youtube.

MagTag child's letters/numbers game

A MagTag child’s letters/numbers game – Adafruit Forums.

embedded.fm

An interview with Thea Flowers (Stargirl, @theavalkyrie) who creates open source and open hardware craft synthesizers that use CircuitPython for customization. She also writes about the internals of the SAMD21. Thea’s synthesizer modules are found at Winterbloom, including Castor & Pollux and the Big Honking Button – embedded.fm via Twitter.

Apple M1 Python

Python 3.9.1 natively runs on macOS Big Sur running on the Apple M1 processor – Adafruit Blog.

Attaching Sensors to the Raspberry Pi

Video Tutorial: A Definitive Guide to Attaching Sensors to the Raspberry Pi (uses the Blinka compatibility layer for CircuitPython) – YouTube.

500-LED christmas tree

Running untested, viewer-submitted Python code on a 500-LED christmas tree – uses the Blinka Compatibility layer – YouTube.

Unicode Database

Use the Unicode Database (unicodedata) module to detect accented characters – Twitter.

Classical Aerodynamics with Python

Classical Aerodynamics of potential flow using Python and Jupyter Notebooks – GitHub.

C for Python Programmers

C for Python Programmers – Real Python via Twitter.

The pass statement – doing nothing in Python – Real Python.

Python In 1 Minute

Python In 1 Minute – Learn something new about Python every day in less than 1 minute video – YouTube via Twitter.

PyDev of the Week: Leodanis Pozo Ramos 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? Meet the PyCorder.

Coming soon

There has been multiple announcements of boards using the new Raspberry Pi RP2040 microcontroller from multiple vendors. As these get close to release, it is hoped they can be put in this section.

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 we had 13 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!

New Learn Guides

Getting Started with Raspberry Pi Pico and CircuitPython by Kattni Rembor.

DIY Darksaber Build – 3D Print with PropMaker FeatherWing and BLE from Noe and Pedro.

CircuitPython Libraries!

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 292!

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

Late last week, I made the 6.1.0-rc.1 release, and just today, as of this writing, I published the 6.1.0 stable release. For some new boards, most notably the MagTag, there hasn’t been a stable release yet, and in addition, the 6.1.0 development releases have been recommended over 6.0.x for ESP32-S2 for some time.

6.1.0 has some remaining known issues, but they are mostly bugs that existed in 6.0.1 as well. I spent a while studying a file writing delay that is due to not running USB tasks often enough, but could not determine the root cause immediately. So I will continue to work on it and not hold up the 6.1.0 release.

Last week Scott invited me to join him on his weekly Deep Dive video stream. We talked about the CircuitPython 2021 submissions, and then I discussed some bugs I’d recently worked on in detail. I enjoyed it very much, and am looking forward to seeing other CircuitPython contributors on the stream.

Jeff

Continuing with the audio theme on ESP32-S2, I’ve begun implementing DAC-based AudioOut for this port. While there is not an API provided for this purpose in the ESP-IDF, there is a way to access the functionality at the machine register level, as well as a demo/test provided by Espressif. I’m using this as a guide to implement our own code. Hopefully, this will provide stereo, 8-bit audio outputs on this chip; enough to play Wave files on the MagTag’s buzzer, for example. However, this is at an early stage and hasn’t actually made any noise yet.

Kattni

The last two weeks have been spent working on the Getting Started guide for the new Raspberry Pi Pico! This guide covers getting started with the Pico and CircuitPython. You’ll learn how to install CircuitPython on your board (spoiler alert: it’s super simple!). Then you’ll learn some CircuitPython programming basics – some of which are so useful that they have been slated for later addition to the Welcome to CircuitPython guide. Finally, the guide includes multiple project examples, from blinking an LED, to controlling the LED with a button, to building a traffic light simulator, reaction game and burglar alarm. The Overview contains a list of the hardware you need to complete all of the projects, so you can pick up all the extras and be ready to build! The guide and examples cover many of the features of the Pico board, and give you an excellent basis for expanding into your own projects. If you’re getting a Pico, and you’re looking to get started with CircuitPython, this guide is perfect for you. Check it out!

Lucian

This past week, I worked on separating the TLS functions out of the Socket module. TLS stands for Transport Layer Security, and is a set of cryptographic protocols that help make internet communications secure – it’s the successor to SSL (Secure Sockets Layer) which is now deprecated.

Previously, CircuitPython’s implementation of the Python Sockets module (based on Berkley Sockets) was using TLS functions directly for functions like connect, send, and receive_into. However, this didn’t match the behavior of CPython, which includes only transport-layer protocols (TCP and UDP) in the default Socket module, and uses a different wrapper class called SSLSocket for all the cryptographic capability. I’ve now moved our TLS code into a new SSLSockets module for CircuitPython to match, and implemented TCP-only versions of functions like connect() for default sockets.

Since that’s wrapped up and is waiting on my other Socket work to be accepted, I’m now learning about the guts of the low power code, so I can start helping out on the various bugs in that domain. Low power has been something I’ve been hoping for for a while, so I’m excited to get into it.

I also wrote my CircuitPython 2021 post, and read the ones from everyone else. Good stuff!

Melissa

This past week, I finished up the last of the PortalBase refactors by refactoring Blinka PyPortal. This was certainly simpler than the other libraries, but had its own challenge with some changes that allowed it to run in PyGame. Fortunately it wasn’t too difficult to figure out with a few additional changes to PortalBase.

I ended up adding 2 boards to Blinka this week. First up was the BeagleBone AI. I thought it would be easier than it was, but soon came to realize the BeagleBone IO library did not yet support it. So I took an alternative approach and used libgpiod. That worked well enough for GPIO and I2C. I was unable to get SPI running, but left what I had done in place. Most of the challenges I came across involved sparse documentation or conflicting information.

The other board I added was the NanoPi NEO Air. I figured this board would be pretty straightforward because it was based on the AllWinner H3 chip and we already had several boards using that. It didn’t disappoint and I was able to get it added and completely functioning and tested in record time in just a couple of hours.

Scott

This week I’ve been getting the ducks all lined up in a row for the Raspberry Pi Pico / RP2040 CircuitPython launch. I’ve been working on the port for just over a month. At launch we have:

  • digitalio
  • analogio.AnalogIn
  • busio.I2C, busio.SPI
  • neopixel_write
  • pwmio.PWMOut

In addition, we have a rp2pio module for the unique programmable IO peripheral in the RP2040. It is already used internally for neopixel.

Furthermore, we have full build enabled so things like displayio, touchio, ulab, usb_midi and usb_hid also work.

While most of the core APIs are included, more will be added in the coming months as we see all of the cool things folks want to use it for.

Upcoming events!

Girls Into Coding

A free virtual “Girls Into Coding” event via Zoom on Sunday, 31 January 2021 – Choose 1 of 5 workshops. There will also be lightning talks to inspire & encourage girls aged 10 -14 to get involved in tech – Eventbrite.

FOSDEM 2021 Python Developer Room

FOSDEM is a free and non-commercial event organised by the community for the community. Typically hosted in Brussels, Belgium, FOSDEM 2021 is taking place online February 6-7, 2021. This year, there will be a Python Developer Room. Details – Adafruit Blog.

PyCascades 2021

PyCascades is a regional PyCon in the Pacific Northwest, celebrating the west coast Python developer and user community. To be online February 19th — 21st, 2021. The schedule is here.

Geek Mom Projects (Debra) will be speaking on February 20th on how she uses CircuitPython in the development process. There will be blinky project demos.

More – PyCascades.

2021 Open Hardware Summit

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.orgOSHWA.

PyCon US 2021

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.0. New to CircuitPython? Start with our Welcome to CircuitPython Guide.

20210123 is the latest CircuitPython library bundle.

v1.13 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.1.0a4.

1,993 Stars Like CircuitPython? Star it on GitHub!

Call for help – Translating CircuitPython is now easier than ever!

CircuitPython translation statistics on weblate

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

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) – Adafruit Jobs Board.

The Executive Director will work with the board to build a bridge to a stronger future for OSI and the open source ecosystem. The candidate will set strategic direction and move the Open Source Initiative towards our vision, working with the staff and community to achieve measurable program outcomes.

This role is ideal for the experienced executive director who can take organizations to the next level. The candidate can set strategy and translate it into programmatic results, achieved through organizational leadership and operational excellence. Additionally, they have a strong understanding of open source culture and norms as well as the Open Source Initiative mission and programs. Plus, the candidate excels at managing ambiguity and drives for clarity and impact.

26,873 thanks!

26,873 THANKS

Adafruit Discord

The Adafruit Discord community, where we do all our CircuitPython development in the open, reached over 26,873 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

ICYMI

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

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.