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

View this email in your browser.

We’re giving thanks in this latest Python on Microcontrollers newsletter. It is more important than ever that Python is a community-driven language, including CircuitPython and MicroPython. This issue shows efforts by the community to make wonderful things with Python.

Don’t forget: we’re on Discord, Twitter, and for past newsletters – view them all here. If you’re reading this on the web, subscribe here.

MicroPython adds official SAMD21 and SAMD51 MCU support

MicroPython adds official SAMD21 and SAMD51 MCU support

MicroPython has added mainline support for the Microchip SAMD21 and SAMD51 microcontrollers.

The REPL can be over USB VCP or USART using board specified USART pins (initialized on startup).

Flash usage is flexible. The internal Flash Block Device samd.Flash() is initialized with littlefs1 in frozen module _boot.py, 64k for the SAMD21, 128K for the SAMD51.

SPI bus usage is still a work in progress.

More information can be found on the MicroPython GitHub repo.

CircuitPython Online IDEs

CircuitPython Online IDEs

The idea is simple: have a web-based development environment for CircuitPython. This eliminates the need for installing software and provides a unified interface. It definitely is possible with newer web technologies in modern builds of the Chrome web browser. GitHub user Mr-Coxall first started this trend two years ago. The idea was picked up by GitHub user sensebox 8 months ago.

Most recently, River Wang, GitHub user urfdvw, has made progress with a rather nice web based editor fittingly named “CircuitPython Online IDE”. Available in English and Chinese, the project is well documented and has many features. There are serial console and plot output capabilities.

Lean more: GitHub (code and documentation), YouTube and CircuitPython Online IDE.

ESP32-S3 mini modules make for an easy ‘S3 Feather

ESP32-S3 Feather

Adafruit picked up some ESP32-S3 Mini modules from Digi-Key and surprise! They are pin compatible with the S2 Mini modules. That means they were able to upgrade their ESP32-S2 Feather to use the newest dual-core+BLE chipset. All the pins have been tested, NeoPixel works and so does I2C… they are fabricating some of these and will have some for the Adafruit shop in a very limited quantity for bleeding-edge developers as soon as Adafruit can get a reel from Espressif – Adafruit Blog and YouTube.

Wirelessly Code your Bluetooth Device with Code Editor for CircuitPython

Wirelessly Code your Bluetooth Device with CircuitPython

Did you know you can transfer files over BLE? This is the basis for being able to edit CircuitPython files directly on your device.

Adafruit has been working on a new web-based Code Editor for CircuitPython. This allows you to edit files directly on your Bluetooth devices using just the Chrome web browser without installing any additional software. The great thing about this code editor is it is written completely in JavaScript, so it only runs on your computer and none of your data is ever uploaded to a server – Adafruit Learning System and https://code.circuitpython.org/.

Meet the Maker: Anne Barela

Meet the Maker

Adafruit engineer Anne Barela was interviewed for the latest issue of HackSpace Magazine, Issue 49.

If you’ve ever programmed anything in CircuitPython and understood the instructions first time, you probably have Anne Barela to thank. She’s a consulting engineer at Adafruit, where she puts her vast array of experience into helping people make cool stuff that ‘just works’. She’s had her work go into space on the Shuttle, she helped make sure the world’s computers didn’t melt when the clocks reset to zero in the year 2000, and she’s a big fan of open source. We got a bit flustered when we spoke to her to be honest – where do you start with a career that’s included Caltech, Hewlett-Packard, NASA, Boeing, and the US Diplomatic Service? So, we started with something we can all understand: CircuitPython.

You can read about Anne, her varied professions, her making trajectory and what she’s doing now in the latest HackSpace Magazine – Adafruit Blog. (Disclosure: Anne is your editor)

CircuitPython Deep Dive Stream with Scott Shawcroft

Deep Dive with Scott

This past week, Scott streamed his work testing CircuitPython on the Raspberry Pi.

Programming Note: There will be no Deep Dive live feed on Friday November 26th due to the US Thanksgiving weekend.

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

CircuitPython Parsec

CircuitPython Parsec

John Park’s CircuitPython Parsec:

Catch all the episodes in the YouTube playlist.

Python Software Foundation News

Python Software Foundation News

News from the PSF Community News Newsletter:

Staffing

  • The PSF is hiring a new Executive Director. After announcing earlier this summer that Ewa Jodlowska is leaving after ten years of service, the PSF has begun its search for the organization’s next Executive Director. Interested? You can apply here today.
  • Loren Crary joined the PSF in November 2021 as the new Director of Resource Development. Loren’s focus will be to strengthen the PSF’s fundraising and sponsorship efforts. Additionally, Loren will support the PSF with locating incoming grants to support the PSF’s initiatives.
  • Olivia Sauls joined the PSF in August 2021 as an Event Assistant and Administrator. Olivia is supporting PyCon US planning and execution. Additionally Olivia is supporting the PSF with administrative tasks pertaining to her role as the Secretary Assistant to the Foundation.

PyPI user feedback!

The PSF conducted a survey and interviewed PyPI users to understand common themes of improvements that would add value to PyPI. In order to consolidate these findings, we are conducting a poll that is open to anyone. Sharing feedback will allow us to decide our next course of development efforts – Participate today.

Last call for Python Developers Survey!

The Python Developer Survey helps the community better understand how Python is used and community trends. We will be closing the survey in about a week so if you have not yet participated in the survey, please do so – Survey.

News from around the web!

displayio palettes in CircuitPython

Using displayio palettes in CircuitPython to make a sorta datamosh slideshow viewer (with demo code) – Twitter.

Getting Pushy

CircuitPython School – The Right Way to Add Buttons to a Raspberry Pi, Pinouts, and Cheer Machine – YouTube via Twitter.

Keyboard light

An adjustable keyboard light made with CircuitPython. It has a rotary encoder to switch it off/on and set the brightness. It uses a Feather RP2040 and a NeoPixel strip – Twitter.

2 wire NeoPixels

A hack of using NeoPixels with only two wires, with CircuitPython source code – GitHub and Twitter.

Dragon

Making dragon fire with NeoPixels and CircuitPython – Twitter.

Raspbery Pi Pico 5x5 Macropad

Build a Raspberry Pi Pico Macropad for use with CircuitPython – YouTube, CircuitPython code on GitHub, via Reddit.

Nugget bitmaps

CircuitPython code example for the S2 WiFi Nugget: learn to show custom bitmap images on the Nugget’s SH1106 display module. Sample code (with faces) – GitHub via Twitter.

Publishing Particulate Matter Sensor Data to Adafruit IO With Maker Pi Pico and ESP-01S

A CircuitPython program using the Cytron Maker Pi Pico with an ESP-01S to send data to Adafruit IO from three particulate matter sensors, Plantower PMS5003, Sensirion SPS30 and Omron B5W LD0101 – Instructables.

CircuitPython testing

A GPS enabled temperature and humidity project with display, using a Pimoroni Pico and CircuitPython – Twitter.

Porting MicroPython to the Thumby gaming device

Porting MicroPython to the tiny Thumby gaming device – Twitter.

MicroPython on the ESP32-C6-DevKitC1

MicroPython ported to the ESP32-C6-DevKitC1 ESP32-C6 RISC-V board – Twitter.

RPG Game

Implemented graphics for a MicroPython Picodisplaypack port of my RPG game using the RP2040 chipset. Still space issues, so last thing is title graphics. After that, back to regular Pico8 for a while before doing a Thumby port – Twitter.

Making noise music with a Raspberry Pi Pico

Making noise music with a Raspberry Pi Pico and MicroPython – Twitter, Iffy Books and tutorial PDF.

MicroPython asyncio

MicroPython uasyncio V3 is a release of uasyncio pre-installed in current daily firmware builds and found in release builds starting with V1.13. This complete rewrite of uasyncio supports CPython 3.8 syntax. A design aim is that it should be be a compatible subset of CPython asyncio – GitHub source and documentation.

MicroPython and TensorFlow for object tracking on the OpenMV H7 board

Using MicroPython and TensorFlow for object tracking on the OpenMV H7 board – Edge AI and Vision Alliance and YouTube via Twitter.

Control a 7 Segment Display from Raspberry Pi Pico and MicroPython

Controlling a 7 Segment Display with a Raspberry Pi Pico and MicroPython – peppe8o via Twitter.

Tiny2040bot

The smallest RP2040 robot with ESP8266 WiFi – Raspberry Pi Forums and Twitter Thread.

BLE, interrupts and timers in MicroPython and controlling appliances via BLE – YouTube via Twitter.

Emulation with Wokwi

wokwi is a free online simulator for Arduino (ATmegas, ATtinies), ESP32, Raspberry Pi Pico projects (for C and MicroPython), and more. Many peripheral components are supported – Wokwi.

prometeo

prometeo – An experimental Python-to-C transpiler for embedded high-performance computing – Adafruit Blog and GitHub.

Invalid Syntax in Python

Invalid Syntax in Python: Common Reasons for SyntaxError – Real Python.

texus

A fork of discord.py, texus is a modern, easy to use, feature-rich, and async ready API wrapper for Discord written in Python – GitHub via Python Awesome.

Intermediate Python

Intermediate Python — How do I take my Python skills to the next level? – Real Python.

Embedded GUIs

5 Reasons Why I Dread Writing Embedded GUIs – Benjamin Cabé.

Selecting a programming language can be a form of premature optimization – Tall, Snarky Canadian.

The SHA256 algorithm in Python without using any modules – GitHub.

PyDev of the Week: Paul McGuire on Mouse vs Python

CircuitPython Weekly Meeting for November 22, 2021 (notes) on YouTube

#ICYDNCI What was the most popular, most clicked link, in last week’s newsletter? Make Magazine on the Internet Archive.

Coming soon

Pink RP2040 Based Boards

Adafruit to release pink RP2040-based boards – Tom’s Hardware.

Adafruit’s Feather RP2040 is the first board to feature the eye-catching punk pink PCBs that come powered by Raspberry Pi’s RP2040 own silicon. The pink Feather RP2040 features the same layout and schematic as the original black model, a model that we awarded an Editor’s Choice. The pink Feather RP2040 also features USB-C, onboard LiPo charging, NeoPixel, and a rather useful Stemma QT connector that can be used with components using the Stemma QT / Qwiic standard.

CAST-AWAY RP2040

Cast-Away RP2040 is a small RP2040 board with USB-C, castellated pads, NeoPixel, 15 GPIO, and CircuitPython support – Tindie via 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 five 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

RGB Matrix Dreidel Game from Liz Clark

NeoPixel Ring Lamp from Noe and Pedro

Wirelessly Code your Bluetooth Device with CircuitPython from Melissa LeBlanc-Williams

CircuitPython Project Bundle

BundleFly

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.

Project Bundle download button

Click the button to download the Project Bundle zip.

Project Bundle zip downloaded

Open the Project Bundle zip to find the example code, all necessary libraries, and, if available, any images, sounds, etc.

Project Bundle unzipped

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

New Libraries!

Here’s this week’s new CircuitPython libraries:

Updated Libraries!

We recently did some updates to how the library testing works across all of the libraries, and that means there’s too many updated libraries to list this week!

What’s the team up to this week?

What is the team up to this week? Let’s check in!

Dan

I made our latest beta release, CircuitPython 7.1.0-beta.0, on November 11. Try it out and let us know of any issues.

7.1.0-beta.0 contains support for asyncio. I’ve started writing a guide about using asyncio in CircuitPython: you can check out the draft so far. Here’s an example of blinking two LEDs independently:

import asyncio
import board
import digitalio

async def blink(pin, interval, count):
    with digitalio.DigitalInOut(pin) as led:
        led.switch_to_output(value=False)
        for i in range(count):
            led.value = True
            await asyncio.sleep(interval)       # Don't forget the "await"!
            led.value = False
            await asyncio.sleep(interval)       # Don't forget the "await"!

async def main():
    led1_task = asyncio.create_task(blink(board.D1, 0.25, 10))
    led2_task = asyncio.create_task(blink(board.D2, 0.1, 20))
    await asyncio.gather(led1_task, led2_task)  # Don't forget the "await"!
    print("done")

asyncio.run(main())

Kattni

This week I finally published the new pages in the Welcome to CircuitPython guide. There is a new How Do I Learn Python? page that has links to resources to help you learn Python. Check it out if you’re new to CircuitPython, or if you’re interested in seeing the latest revision of the guide.

Next up is the Feather ESP32-S2 guide. Keep an eye out for that!

I updated the Adafruit CircuitPython DisplayIO SH1107 library to support the new Adafruit Monochrome 1.12” 128×128 OLED Graphic Display. It now supports the new display and includes a basic example including text and basic shapes.

I also published the guide for the new OLD display. It includes everything you need to get started with your new display including an overview, pinouts, downloads resources, and examples in both CircuitPython and Arduino.

Melissa

This past week I finished writing a guide on using the CircuitPython Code Editor. This is a web-based code editor that makes use of Web Bluetooth to be able to edit code directly on your device without any software besides the Chrome Web Browser. While writing the guide, I discovered that the Code Editor ran just fine on Linux and Windows, so I made sure to include directions for connecting with those operating systems as well. You can check out the learn guide at https://learn.adafruit.com/wirelessly-code-your-bluetooth-device-with-circuitpython.

Scott

Similar to last week, I’ve been working to wrap up the CircuitPython on Raspberry Pi work to get an initial version in. I filled out the board module with pins, added board.DISPLAY and made it possible to resize the displayio framebuffer shown on the display. I’ve still got a tricky issue to solve on the Pi Zero 2W when the CIRCUITPY drive is going. I’m also working to get the Pi builds going in the continuous integration system (CI) on GitHub Actions. Once it’s going, we’ll build new versions every commit and also auto-release the files.

Upcoming events!

RISC-V Summit

RISC-V Summit brings the community together to show the power open collaboration can have on the processor industry. The audience spans across industries, organizations, workloads, and geographies to learn about the technology advancements in the RISC-V ecosystem and visibility of RISC-V successes. The event is December 6 – 8, in-person in San Francisco or virtually from anywhere in the world – Linux Foundation via Twitter.

PyCascades 2022

PyCascades is a regional PyCon in the Pacific Northwest, celebrating the west coast Python developer and user community. Our organizing team includes members of the Vancouver, Seattle, and Portland Python user groups. DATES ANNOUNCED: February 5th-6th, 2022 The conference will take place on Saturday and the first half of Sunday, with the post-conference sprints following that on Sunday afternoon. After three amazing in-person conferences and an engaging online conference, we are ready to do it again! – PyCascades 2022.

PyCon US 2022

PyCon US 2022 planning is underway. The team is planning to host the event in person with an online component. April 27 – May 5, 2022. Head over to the PyCon US 2022 website for details about the conference and more information about the sponsorship program – PyCon Blog.

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 7.0.0 and its unstable release is 7.1.0-beta.0. New to CircuitPython? Start with our Welcome to CircuitPython Guide.

20211122 is the latest CircuitPython library bundle.

v1.17 is the latest MicroPython release. Documentation for it is here.

3.10.0 is the latest Python release. The latest pre-release version is 3.11.0a2.

2,662 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, Micro Center, Raspberry Pi and more.

Job of the Week

Tech Lead, Hack Club Bank – Hack Club – Adafruit Jobs Board.

31,825 thanks!

31,825 THANKS

Adafruit Discord

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