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

View this email in your browser.

Hi everyone! Here’s the latest 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. Let’s go:

CircuitPython powered protest signs

Black Lives Matter

The Adafruit team made a Black Lives Matter light up protest sign for night time use that works and looks great using a 64×32 RGB LED Matrix, Adafruit Feather, and CircuitPythonYouTube.

Black Lives Matter

These panels are normally used to make video walls. Here in New York, we see them on the sides of buses and bus stops to display animations or short video clips. You can make them portable and informative.

The matrix can also display the names of Black people killed by the police which the Washington Post compiled into a database which is a data source on GitHub and saytheirnames.glitch.me

Check out the guide RGB LED Matrices with CircuitPython and the code is on GitHub. Join Adafruit’s anti-racist efforts to end police brutality, reform the criminal justice system, and dismantle the many other forms of systemic racism at work in this country – adafruit.com/blacklivesmatter

Real Python interviews CircuitPythonista Kattni Rembor

Kattni on Real Python

On Real Python this week, Ricky White interviews Kattni Rembor, creative engineer at Adafruit Industries. Kattni’s role is varied, as she covers embedded software, hardware design, technical writing, and community leadership.

They talk about Kattni’s work developing CircuitPython and the role mentorship has played in her career to date. She also shares her advice for anyone looking to start their first hardware project using CircuitPython – Real Python.

CircuitPython Deep Dive Stream with Scott Shawcroft

Deep Dive with Scott

This week, Scott streams his work on an ESP32-S2 and voting – YouTube.

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

GameBoy CircuitPython

Scott is also author of the CircuitPython on GameBoy cartridge. If you wish to see, the design is on OSHpark. (It isn’t currently reliable enough to sell.)

Adafruit Update

Adafruit

Adafruit is shipping orders as soon as possible, given NYC on-site staffing and safety.

If you have been waiting to order, read Adafruit’s announcement and FAQ and then Shop Adafruit.

Note: there may be a number of out of stock items as manufacturing gears back up. Adafruit suggests if an item is out of stock and needed, searching at resellers may yield results. In the US, Digi-Key is suggested.

The colorful Nanoleaf sculpture

Nanoleaf sculpture

Nanoleaf sculpture (rear)

Geek Mom Projects has made a DIY “Nanoleaf” sculpture. Triangle PCBs use side-emitting LEDs which diffuse into a translucent acrylic layer. It’s free standing and modular. It is assembled by screwing smaller PCB connectors to the back of adjoining boards. On the back, a system of spring connectors and pads transmits signal and power. A thin buffer layer of clear acrylic keeps the spring connectors from getting crushed. It is all powered by an Adafruit ItsyBitsy M4 Express running CircuitPython – Twitter.

News from around the web!

Sparkline class

The sparkline class provides a scrolling line graph, where any values added to sparkline using add_value are plotted. Kevin Matocha created a sparkline example for CircuitPython and displayio with inspiration from a Hackaday articleTwitter and GitHub.

Bluetooth Hunting Droid

A Bluetooth Mandalorian Tracking Fob for Galaxy’s Edge Droids using Adafruit Circuit Playground Bluefruit – YouTube and Writeup.

Pool Monitoring using CLUE

A pool temperature monitor using an Adafruit CLUE with a Kitronik Zip Halo HD. The LEDs change from red to blue when the temperature drops below 69.5°F and the LCD also displays the temperature – Twitter.

ChronoPy

The ChronoPy is a hacker-friendly, CircuitPython-powered wristwatch based on the 2020 Open Hardware Summit badge. It will be released soon on Hackster LaunchTwitter.

Arc Reactor CPU Load Monitor

A DIY Arc Readctor CPU Performance Monitor with Arduino and Python – The DIY Life and Hackster.io.

Shift register out with CircuitPython and Arduino

Shift Register Out with CircuitPython and Arduino – YouTube.

Adafruit Feather M0 and VEML6075

An Adafruit Feather M0 and VEML6075 ultraviolet light sensor, an example in CircuitPython – Learn MicroPython.

Thermal Printer on Raspberry Pi

An interactive choose your own adventure game using a Raspberry Pi, a thermal printer and some controls with CircuitPython – Twitter.

The Entire Python Language in a Single Image

Learn it Faster: The Entire Python Language in a Single Image – FossBytes via Twitter and Image.

Runtime Class Modification

Runtime Class Modification – only using library features needed, saving RAM depending on the application – Hyperlink Your Heart.

MiniPB is a Mini Protobuf library in pure Python and it’s small enough to run in MicroPython – GitHub.

Build Physical Projects With Python on the Raspberry Pi

Build Physical Projects With Python on the Raspberry Pi – Real Python via Twitter.

MicroPython plugin 1.1 for PyCharm

A MicroPython plugin for PyCharm which auto-detects connected MicroPython devices, uses the nearest Sources Root as the device root for flashing files, ignore .git, .idea while flashing – Twitter and JetBrains.

MicroPython tutorial

Micropython tutorial: Networking basics on the M5Stack WiFi Scanner – YouTube.

Quick Python Tip: Suppress Known Exception Without Try Except – Toward Data Science via Twitter.

When Python Practices Go Wrong – RhodesMill via Twitter.

Glances

Glances – a cross platform, Python powered system monitoring tool that packs lots of data into a small package – bigl.es.

Linux interactive kernel map

An interactive map of Linux kernel – GitHub.io via Twitter.

PyDev of the Week: Dong-hee Na on Mouse vs Python

CircuitPython Weekly Meeting for June 8th, 2020 on YouTube and on diode.zone

#ICYDNCI What was the most popular, most clicked link, in last week’s newsletter? Summer of Making – Hack Club – GitHub is sponsoring $50k worth of hardware grants for Adafruit hardware!

Made with Mu

Why Mu? Mu tries to make it as easy as possible to get started with programming but aims to help you graduate to “real” development tools soon after. Everything in Mu is the “real thing” but presented in as simple and obvious way possible. It’s like the toddling stage in learning to walk: you’re finding your feet and once you’re confident, you should move on and explore! Put simply, Mu aims to foster autonomy. Try out Mu today! – codewith.mu

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

Looking for adding a new board to CircuitPython? It’s highly encouraged! Adafruit has four guides to help you do so:

New Learn Guides!

T³ Time Triangle Thing

T³ Time Triangle Thing from Carter Nelson

Adafruit AHT20 Temperature & Humidity Sensor from Kattni

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

New Libraries!

Here’s this week’s new CircuitPython libraries:

Updated Libraries!

Here’s this week’s updated CircuitPython libraries:

PyPI Download Stats!

We’ve written a special library called Adafruit Blinka that makes it possible to use CircuitPython Libraries on Raspberry Pi and other compatible single-board computers. Adafruit Blinka and all the CircuitPython libraries have been deployed to PyPI for super simple installation on Linux! Here are the top 10 CircuitPython libraries downloaded from PyPI in the last week, including the total downloads for those libraries:

Keep checking back for more updated download stats coming soon!

What’s the team up to this week?

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

Bryan

With the work on the ICM20948 library completed, I moved on to finishing up the previously started tester code. Testers are the final arbiter of a board’s fitness to be sold, so the tester code is where we make sure that we’ve tested all of the hardware on the breakout board. We can fix libraries later if we’ve missed something or haven’t enabled a feature, however once the hardware ships to customers, that’s how it’s going to be for as long as they own it. Testers, and the code that powers them, are responsible for catching any glitches in manufacturing that, while rare, do occur. Making sure the tester code is right is in some ways more important than the library itself.

Bryan

After finishing work on the ICM20948, I shifted to adding support for the LSP22 pressure sensor to the LPS2X library. The LPS22 is very similar to the LPS25 but not identical, so the libraries are able to share some but not all of the code. Ladyada had previously refactored the Adafruit_LPS2X Arduino library to add the LPS22HB, so my task was to do the same for the Adafruit_CircuitPython_LPS2X library. This refactor is a good example of a fundamental technique of object oriented programming, subclasses and superclasses. The base class LPS2X takes up the bulk of the library and includes all of the code that is common to both sensors. The LPS22 and LPS25 subclasses then inherit from LPS2X and then make small but meaningful changes to allow it to fit their particular requirements.

The end result is that rather than repeating the process of writing code that fulfills the common needs of both sensors, I am able to write it once and share it between both sensors. This idea is often called Don’t repeat yourself or DRY and in addition to reducing the amount of redundant code, it also centralizes the common code which makes it easier to fix or add features that are common across different uses.

Dan

I’m continuing the re-implementation of CircuitPython _bleio on host computers using the bleak Python library. I’m using the Heart Rate Monitor library as a test, and had to implement most of _bleio to get even that simple library to work. I had to make some changes to the base adafruit_ble library to accommodate Python on the host machines, and I’m testing now.

Jeff

On the STM32F405 Feather, I have finished SDIO read and write code. The performance is better than SPI, especially when you are moving more data around. However, even just writing a log file in text, you can log over 1000 lines per second! This is on a “fresh”, class-4 4GB SD card, I’m not sure how performance changes as the card fills up.

This code is in an open pull request on GitHub, so if you are comfortable building CircuitPython from source you can give it a try today.

Jeff

Next we want to bring SDIO code to the SAMD51. However, all the existing Adafruit boards use SPI. Hopefully this “breakout”, made from a micro SD adapter, will let me get the prototype code working:

Jeff

While taking a break from SD cards, I returned to a problem that had been reported but never addressed: When using AudioMixer, if voice[0] was not playing anything, the sounds from other voices was distorted. I also discovered a reason for pops when starting/stopping playback on voice[0], with the same root cause. These bugfixes are now in the latest master branch, and should be a part of 5.4.0 when it is released.

Kattni

This week I started the AHTx0 CircuitPython driver, but due to timing, finalising that was handed back to Ladyada. Instead, I completed the AHT20 product guide. The AHT20 is a low-cost temperature and humidity sensor on a breakout that includes STEMMA QT connectors so you can get started quickly without soldering. The guide covers pinouts, Arduino usage, CircuitPython usage and downloads related to board including schematic, Fritzing object, EagleCAD files, and data sheet. The board will be in the Adafruit shop soon, so if you’re looking for a lower cost alternative for sending temperature and humidity, keep an eye out for that.

Lucian

This week had a couple of major bugs come up across the STM32 and i.MX, so I’ve been hopping between the two projects as issues emerge. My big project of the last few days has been revisiting the clock management of the STM32s, to both fix some low-power related Real Time Clock (RTC) setup issues that were causing crashes across several dev boards, but also to make it a bit more comprehensive and maintainable. It’s been useful to learn about some of the features I’ve been taking for granted, and should allow new STM32 boards to enable more low power customization.

I’ve also wrapped up my i.MX testing on the 1010, just in time to get some new reset issues on the 1060 series. I’ve been doing my best to get quick hotfixes in and then following up with more comprehensive reworks later, so boards don’t stay out of commission too long. I’m hoping my i.MX Feather will arrive to complement my Teensy 4.0 soon, so I can have a wider range of easily debugged chips to test with.

Melissa

Melissa

This past week I was working on catching up with some of my smaller projects. One of the projects that I really enjoyed working on was writing up a couple of demos for an eInk bonnet. Since I didn’t actually have the eInk bonnet, I assembled one using the Adafruit Perma-Proto HAT for the Raspberry Pi along with an eInk breakout and a few passive components that I had on hand.

One of the demos I worked on went out and fetched weather data and displayed it on the eInk. This was a little challenging in that using too small of fonts would result in reduced readability, so I needed to experiment with font size, boldness, and the overall layout and it came together nicely. The code is based on the PyPortal weather code, but uses the meteocons font, which was inspired by Dan Cogliano, to display the weather image. So there’s actually no graphics involved in the traditional sense.

Melissa

Another project that I worked on was updating the WebSerial 3D viewer that I had built a few months back in order to display calibration information for the BNO055. The cool part of this is that the calibration window will automatically appear only when calibration information is sent, so using the page with a board such as the CLUE will still look like it did before. I wrote up a guide page for that as well, which can be found inside the Adafruit BNO055 guide.

Scott

This past week I finished up busio.I2C on the ESP32-S2. Thanks to MarkOlsson for pointing out a problem with ACK/NAK that got a sensor working. Once that was done, I added pin validation and pull up checking. Next up is UART and SPI. I’ll also be doing a new beta release shortly.

Upcoming events!

FlaskCon 2020

FlaskCon is a community driven Flask event being held July 4th and 5th. It is intended for speakers and attendees all over the world to participate in technical and evangelical sessions related to Flask. Flask is a micro web framework written in Python – Event and Call for Papers.

EuroPython 2020

EuroPython 2020 this year will be an online conference from July 23-26. The schedule is now available – Website.

Attending the conference days will require a ticket, participating in the sprint days will be free – EuroPython.

PyCon Australia 2020

PyCon AU has announced they are holding PyConline AU, an online event, in August 2020 – pycon.org.au.

PyCon India 2020

PyCon India 2020: the premier conference in India on using and developing the Python programming language. Held online October 3-5, 2020. A call for proposals is now open through August 14, 2020. – Website and Twitter

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

20200605 is the latest CircuitPython library bundle.

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

3.8.3 is the latest Python release. The latest pre-release version is 3.9.0b1.

1,739 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.

20,689 thanks!

20,689 THANKS

Adafruit Discord

The Adafruit Discord community, where we do all our CircuitPython development in the open, reached over 20,689 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 first video-newsletter-podcast that we’ve started! The news comes from the Python community, Discord, Adafruit communities and more. It’s part of the weekly newsletter, then we have a segment on ASK an ENGINEER and this is the video slice from that! 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 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. Join our Discord or post to the forum for any further questions.