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

View this email in your browser. Warning: Flashing Imagery

Welcome to the latest Python on Microcontrollers newsletter! Happy New Year! We found some CSS issues in the Newsletter template, which hopefully have been corrected, making it easier to read each week. A new year brings new opportunities for using Python in innovative ways. You can steer the discourse - let the CircuitPython team know your thoughts over the next two weeks. - Ed.

We’re on Discord, Twitter, and for past newsletters - view them all here. If you’re reading this on the web, subscribe here. Here’s the news this week:

Pybricks Brings MicroPython to LEGO Controllers

Pybricks

Pybricks is Python coding for smart LEGO® hubs. You can run MicroPython scripts directly on the hub and get full control of your motors and sensors.

Pybricks runs on LEGO® BOOST, City, Technic, MINDSTORMS®, and SPIKE®. You can code using Windows, Mac, Linux, Chromebook, and Android.

You can restore the original LEGO firmware with ease. This is very well coded and it even has a dark mode!

See the site at code.pybricks.com and the author Twitter - Adafruit Blog.

CircuitPython in 2023 Kicks Off!

CircuitPython in 2023

As the year starts, the CircuitPython development team would like to take some time to share their goals for CircuitPython in 2023 and beyond. Just like past years (full summary 2019, 2020, 2021, and 2022), they’d like everyone in the Python on hardware community to contribute by posting their thoughts to a public place on the internet by Wednesday January 18th, 2023.

Here are a few ways to post:

  • a video on YouTube
  • a post on the CircuitPython forum
  • a blog post on your site
  • a post on Mastodon with tags #CircuitPython and #CircuitPython2023
  • a Gist on GitHub

They want to hear from you. When you post, please add #CircuitPython2023 and email circuitpython2023@adafruit.com to let them know about your post so they can post it on the Adafruit Blog.

The post can cover any topic related to CircuitPython. See a suggested list and more in the post on the Adafruit Blog. This includes any suggestions or comments related to this newsletter.

Developing with Pi Online Training Series

Developing with Pi Online Training Series

In a live video series, Digi-Key and Raspberry Pi offer insight and instruction on devices from the Raspberry Pi Foundation. The current focus is on the powerful (and available) RP2040 microcontroller and its associated boards, and to get you started they’re even sending out a free Raspberry Pi Pico with every new class registration! - Embedded Computing Design via Twitter.

Book: The Linux Command Line by William Shotts 5th Ed (free PDF available)

The Linux Command Line by William Shotts 5th Ed (free PDF available)

The Linux Command Line by William Shotts – Fifth Internet Edition Available Now!

Designed for the new command line user, this 555-page volume covers the same material as LinuxCommand.org but in much greater detail. In addition to the basics of command line use and shell scripting, The Linux Command Line includes chapters on many common programs used on the command line, as well as more advanced topics.

Released under a Creative Commons license, this book is available for free download in PDF format as well as a paper copy for sale at booksellers - Adafruit Blog and wesite with PDF.

A Keyboard Made Entirely with Python

Keyboard as a Python Code

Python is one of the best programming languages, it can do everything. So hsgw designed an entire keyboard, including the PCB, case, and firmware (KMK/CircuitPython) using only Python. No need to use Kicad and Fusion360. It is explained in a Jupyter Notebook (Google Colaboratory or binder), and it can be customized.

Goals

  • Design not only the firmware, but also the schematic (netlist), PCB, and case all in Python.
  • The code is explained in a runnable Jupyter Notebook (Google colaboratory) environment.

See more - hackaday.io and 5z6p Instruments (Japanese).

The Best Arduino Alternatives of 2022 per All3DP

Best Arduino Alternatives of 2022

Making a list of “the best” Arduino alternatives is very hard at present, as many manufacturers have compelling offerings with broad feature sets. All3DP takes a stab at it and presents their list - All3DP.

This Week’s Python Streams

Python Streams

Python on Hardware is all about building a cooperative ecosphere which allows contributions to be valued and to grow knowledge. Below are the streams within the last week focusing on the community.

CircuitPython Deep Dive Stream

Deep Dive

This week, Tim streamed work on a Pico MIDI Sequencer - Offloading Display to another Microcontroller.

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 is back this week! John discusses I2C Bus Scanning - Adafruit Blog and YouTube.

Also an episode on Using Super Nintendo Controllers - Adafruit Blog and YouTube.

Catch all the episodes in the YouTube playlist.

The CircuitPython Show

The CircuitPython Show

The CircuitPython Show is an independent podcast hosted by Paul Cutler, focusing on the people doing awesome things with CircuitPython. Each episode features Paul in conversation with a guest for a short interview – CircuitPythonShow.

Project of the Week: Gingerbread

Gingerbread

Gingerbread

Gingerbread is a set of Python utilities used by Winterbloom to create decorative printed circuit boards (PCBs), such as the ones used for front panels. It initially started with a command-line driven, Python implementation but eventually involved into a fully browser-based application utilizing a native library written in Zig & C and compiled to WASM - Gingerbread. GitHub and Adafruit Blog.

News from around the web!

CircuitPython Watch

CircuitPython Watch

An LCD watch using an RP2040, RTC, wireless Qi charging, a 1.3” TFT display, and 6 pins including analog ones broken out to a Hirose Mezzanine flat connector. Runs CircuitPython - Mastodon.

NeoTrellis

It lives! When it comes to interactive LED projects, it is best to go large. #NeoTrellis #CircuitPython #STEM - Twitter.

How To Monitor Temperature With a Raspberry Pi Pico

How To Monitor Temperature With a Raspberry Pi Pico and MicroPython - Tom’s Hardware.

Siopao, a Filipino steamed bun

A cuddly dumpling bot that keeps you warm! Perfect companion for the end-of-year season. Machine sewn, animated eyes with an Adafruit Monster M4sk + CircuitPython. USB-powered rechargeable hand warmers inside - Twitter Thread.

Pico Hat Pad

Pico Hat Pad is a Raspberry Pi Pico hat with two mechanical switches and a rotary encoder. Powered by KMK / CircuitPython. This kit aims to be a cheap (under $20 Australian including caps, keys, Pico, PCBs, header pins) macro pad and solder practice kit - GitHub, Hackaday and Adafruit Blog.

MIDI keyboard interface

A MIDI keyboard interface, using Raspberry Pi Pico W and a Raspberry Pi 4 with CircuitPython - Twitter.

FPGA

MicroPython running on an ice40hx8k FPGA with a kianRiscV SOC. 8 MBYTE PSRAM over breadboarding and qqspi all from scratch - Twitter.

BLE Joystick

CircuitPython 8.0.0-beta.6 on an Adafruit Feather nRF52840 Express. Display joystick value with BLE, receive it with the other, and display the coordinates - Twitter.

Skull Eyes Project

Adding NeoPixel eyes to plastic skulls with an Adafruit ItsyBitsy and CircuitPython - BlueDonkey.

HID Remapper

HID Remapper is a configurable USB dongle that allows remapping inputs from mice, keyboards and other devices. It works completely in hardware and requires no software running on the computer during normal use - GitHub.

Sleep in CircuitPython

Investigating sleep modes in CircuitPython on a Seeed Xiao - Twitter.

How to create Google Map in Python using Gmaps

How to create Google Map in Python using Gmaps - Twitter.

30 Helpful Python Snippets You Should Learn Today

30 Helpful Python Snippets You Should Learn Today - morioh.com.

RISC-V BYTES: TIMER INTERRUPTS

RISC-V timer interrupts - Daniel Mangum.

Smalltalk-80 for Raspberry Pi

crosstalk is a bare metal Smalltalk-80 port for Raspberry Pi single board computers - GitHub.

Pyseidon

Pyseidon: a fork-based “load-once, run many times” Python server - FGitHub.

Decorators in Python

Learn about Decorators in Python in this Twitter thread - Twitter.

PyDev of the Week: Kevin McAleer on Mouse vs Python.

#ICYDNCI What was the most popular, most clicked link, in last week’s newsletter? CircuitPython 8.0.0 Beta 6 Released.

New

Banana Pi Pico

Banana Pi Release New Raspberry Pi Pico Alternative - Tom’s Hardware.

Programming the Banana Pi BPI-Pico-RP2040 is a straightforward process. Officially we have the choice of MicroPython and Arduino. Being an RP2040 based board there are other alternatives, such as TinyGo, Rust and CircuitPython. Right now there are no official versions crafted for the Banana Pi BPI-Pico-RP2040 but an eager community will soon port them.

Adafruit SCORPIO

When Adafruit saw the new “PIO” feature of the RP2040 from Raspberry Pi, they knew it would be perfect for driving huge numbers of NeoPixels. So they created the Adafruit Feather RP2040 SCORPIO specifically for NeoPixel (WS2812-compatible) control, but also good for various other PIO-based projects that want to take advantage of the Feather pinout with an additional 8 consecutive outputs (or inputs) - Adafruit Learning System.

Dev kit for M0S (BL616, RISCV RV32GCP)

Coming to Aliexpress January 15th - Twitter.

The tiny dev kit for M0S (BL616,#RISCV RV32GCP 384M,WiFi6,USB2.0 HS). One board for 4 Functions:

  1. M0S Dock: Simple dock board with 12IO
  2. SDebugger: CKLink/DAPLink + UART Debugger
  3. SUART4: USB-to-4UART, every UART up to 20Mbps
  4. SLogic Pico: Simple LA with 40M@8CH~

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 three new boards added!

Note: For non-Adafruit boards, please use the support forums of the board manufacturer for assistance, as Adafruit does not have the hardware to assist in troubleshooting.

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

Introducing Feather RP2040 SCORPIO from Phillip Burgess

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 channels 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 357!

Updated Libraries!

Here’s this week’s updated CircuitPython libraries:

Library PyPI Weekly Download Stats

  • 56973 PyPI downloads over 306 libraries

Top 10 Libraries by PyPI Downloads

  • Adafruit CircuitPython BusDevice (adafruit-circuitpython-busdevice): 15126
  • Adafruit CircuitPython Requests (adafruit-circuitpython-requests): 14460
  • Adafruit CircuitPython Register (adafruit-circuitpython-register): 844
  • Adafruit CircuitPython DHT (adafruit-circuitpython-dht): 731
  • Adafruit CircuitPython BitbangIO (adafruit-circuitpython-bitbangio): 577
  • Adafruit CircuitPython MCP230xx (adafruit-circuitpython-mcp230xx): 501
  • Adafruit CircuitPython BMP280 (adafruit-circuitpython-bmp280): 482
  • Adafruit CircuitPython PCA9685 (adafruit-circuitpython-pca9685): 404
  • Adafruit CircuitPython Pixelbuf (adafruit-circuitpython-pixelbuf): 387
  • Adafruit CircuitPython Display Text (adafruit-circuitpython-display-text): 372

What’s the team up to this week?

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

Dan

We closed three issues for 8.0.0 but potentially have three new ones, making for six as of this writing.

I spent several days debugging a mysterious problem that caused -O2 optimized builds to fail on SAMD builds. At first it seemed to be a USB-related problem, but it turned out that incorrect data was being reported back to the USB host, causing it to think that CIRCUITPY was much larger than it actually was, which caused a crash. After I fixed that, CircuitPython stopped crashing but the CIRCUITPY drive appeared to be corrupted and so was not mounted. I tried to narrow down the problem further, trying and discarding various theories such as delays not being correct, or variables not being volatile. The problem turned out to be related to disabling and enabling the microcontroller’s memory cache during external flash operations. I added “memory fence” operations around the cache operations, and that fixed the problem. This was about as low level as the previous week’s difficult bug, which involved compiler assumptions about register use.

Tim

I assembled the pico cowbell sequencer device designed by community member DJDevon3. I’ve been working on software for it. Learning about USB Midi output and starting to make a control scheme for choosing which notes get sent for each of the indexes in the sequence. I’ve got a few ideas in mind for adding a display to the sequencer, perhaps with a second micro-controller.

Upcoming events!

MicroPython Meetup

The next MicroPython Meetup in Melbourne will be on January 25th – Meetup. Slides from the October meeting are here.

FOSDEM 2023

FOSDEM is a free event for software developers to meet, share ideas and collaborate. Every year, thousands of developers of free and open source software from all over the world gather at the event in Brussels. February 4-5, 2023 in Brussels, Belgium - Fosdem.

PyCon US 2023

PyCon US 2023 will be April 19-17, 2023, again in Salt Lake City, Utah USA - PyCon US 2023.

Send Your Events In

As for other events, with the COVID pandemic, most in-person events are postponed or held online. If you know of virtual events or upcoming events, please let us know on Twitter with hashtag #CircuitPython or email to cpnews(at)adafruit(dot)com.

Latest releases

CircuitPython’s stable release is 7.3.3 and its unstable release is 8.0.0 Beta 6. New to CircuitPython? Start with our Welcome to CircuitPython Guide.

20230102 is the latest CircuitPython library bundle.

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

3.11.1 is the latest Python release. The latest pre-release version is 3.12.0 Alpha 3.

3,355 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.

36,304 thanks!

36,304 THANKS

Adafruit Discord

The Adafruit Discord community, where we do all our CircuitPython development in the open, reached over 36,304 humans - thank you! Adafruit believes Discord offers a unique way for Python on hardware folks to connect. Join today at https://adafru.it/discord.

ICYMI - In case you missed it

ICYMI

Python on hardware is the Adafruit Python video-newsletter-podcast! The news comes from the Python community, Discord, Adafruit communities and more and is broadcast on ASK an ENGINEER Wednesdays. The complete Python on Hardware weekly videocast playlist is here. The video podcast is on iTunes, YouTube, IGTV (Instagram TV), and XML.

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

Codecademy “Learn Hardware Programming with CircuitPython”

Codecademy CircuitPython

Codecademy, an online interactive learning platform used by more than 45 million people, has teamed up with Adafruit to create a coding course, “Learn Hardware Programming with CircuitPython”. The course is now available in the Codecademy catalog.

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 the Adafruit Discord or post to the forum if you have questions.