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

View this email in your browser.

We’re well into September and 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 6.0.0 Beta 0

CircuitPython 6.0.0 Beta 0

CircuitPython version 6.0.0 beta 0 has been released – it is the initial beta release of CircuitPython 6.0.0. The most notable additions since 5.3.x are basic lower power support when in time.sleep(), initial ESP32-S2 support, including WiFi, and _bleio HCI support for ESP32 co-processors. The lower power work changed time keeping and may have introduced bugs. Please use 5.3.x if you need a stable version of CircuitPython. See the Release Notes for all the changes.

The State of OSHdata and Open Hardware

The State of OSHdata and Open Hardware

An update on the OSHdata project and what is happening next in the broader Open Source Hardware community, looking ahead to Open Hardware Month in October.

Our research has been read in over 40 countries around the world, on every continent—except Antarctica. Our report helped increase awareness of the certification program and created a sense of friendly competition between some of the leading Open Source Hardware companies in the world. Since our report was first published, the program went from slightly over 400 certifications to now boasting over 1,000 certifications!

A more than doubling of the certification program was led by Adafruit, who are now the leading creator with nearly 40% of all certifications. To mark this, Adafruit founder Limor Fried was interviewed – OSHdata.

The Open Source Hardware movement is a global movement. It’s not just about leading brands like Adafruit, SparkFun, Olimex, or Field Ready. It’s also not about the big companies are involved in this space and have certified hardware, like Google or BeagleBoard. Open hardware is built by people you know, and by people you may not know yet. We have worked hard to shine a spotlight on the up-and-coming creators.

Read more – OSHdata.

CircuitPython Deep Dive Stream with Scott Shawcroft

Deep Dive with Scott

This week, Scott provides a displayio overview and talks about ESP32-S2 UF2, flash sizes and USB PIDs.

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

Adafruit Update

Adafruit

Adafruit is shipping orders!

Adafruit is stocked and shipping orders!

Now is the best time to get orders in for your favorite products, including items for students.

Science is fun and educational when using Adafruit parts and free, easy to follow tutorials in the Adafruit Learning System.

Shop Adafruit now

The Adafruit Discord Server surpasses 25,000 members!

25,000

Adafruit Discord

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

Hacker Lab’s CircuitPython Program will now be Thursday September 24th online

Hacker Lab

Due to fires and power issues, Hacker Lab, in Sacramento, California, had to reschedule their CircuitPython Day activities. The new date is Thursday September 24th.

Join Hacker Lab instructor and all-around amazing maker Curtis Soldano for a day of learning, discussion and fun!

More – Hacker Lab.

News from around the web!

CircuitPython Unittest

CircuitPython_Unittest provides the MP-Lib unittest.py, giving the full advantage of the Python unittest within CircuitPython – GitHub and Twitter.

DSKY Alarm Indicator Panel Replica

An Apollo DSKY Alarm Indicator Panel replica, programmable in CircuitPython – GitHub.

EuroPython videos available

Sixty videos from EuroPython have now been posted to YouTube for your viewing pleasure – YouTube and Twitter.

CLUE Altimeter

An Adafruit CLUE running CircuitPython from the altimeter guide, on the summit of Snowmass Mountain, Colorado, USA. The summit elevation is 14,098 ft. The upper readout is the corrected altitude, which agrees well with the official number – Adafruit Guide.

JazzIt

JazzIt is software which allows for adding a decorator to your Python functions to play music. For example during a long running function or on error – GitHub.

Road Traffic Counting App

Learning how to count road traffic based on computer vision and without heavy deep learning algorithms, using only Python and OpenCV – LearnML.

Command Line Interfaces

Command Line Interfaces in Python – Real Python.

Ray Tracing

Python-Fast-Raytracer is a basic ray tracer that exploits numpy arrays and functions to work fast. The MIT licensed code is written to make it as readable as possible – GitHub, Reddit, and Twitter.

Concurrency

Speed up your Python program with concurrency – Real Python.

Hackers

What’s your Hackers movie handle? Find out with a Python project – bigl.es.

#ICYDNCI What was the most popular, most clicked link, in last week’s newsletter? Lilygo TTgo T-Watch 2020.

PyDev of the Week: Jim Anderson on Mouse vs Python

CircuitPython Weekly Meeting for September 21, 2020 (notes) on YouTube

Coming soon

framebuf library

Display a scrolling message using only have a single GPIO. The Adafruit pixel framebuf library allows this. Here it is being tested on a Raspberry Pi 3. An Adafruit Learning System guide will be coming soon – Twitter.

Matrix eyes

It wouldn’t be Halloween without a new eyeball project, would it? A 64×32 pixel RGB LED matrix, coded in CircuitPython. A new guide is coming out soon – Twitter.

Matrix Portal M4

The Adafruit Matrix Portal add-on for RGB Matrices plugs directly into the back of any HUB-75 compatible LED matrix display (all the ones Adafruit stocks will work) from 16×32 up to 64×64 – Adafruit.

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

CircuitPython Learn Guides

NeoPixel LED Necklace Insert with USB Charging from Erin St Blaine

Custom Scrolling Quote Board Matrix Display from John Park

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

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

The CircuitPython BNO080 library is now the CircuitPython _BNO08x_ library, which is a simple way of making it clear that it works with both the BNO080 and BNO085 sensors from Hillcrest Labs. Other than a name change, the library will be released by the time you read this, along with newly added calibration code. If you’ve ever had to move your phone around in wonky 3-dimensional figure eights, not unlike making a toy airplane doing some maneuvers, you’ve gone through a calibration procedure like the BNO08x sensors are capable of.

Magnetometers sense magnetic fields like the that surrounds the earth and makes sure your compass points north. This can be handy because, unless something has gone _horribly wrong_, magnetic north will always be to the North (more or less). Motion sensors can use this outside reference to correct any errors in their calculations, but doing so accurately requires accounting for all of the other stray magnetic fields in the sensor’s environment. Most multi-axis sensors with magnetometers have a way of storing this offset information and use it to correct the readings, but you generally have to do the work of calculating it yourself. The BNO08x sensors do all that work for you. In essence, you say “start calibrating” then move the sensor into 4-5 different orientations until it’s told you that it’s calibrated. All you have to do after that is tell it to save the calibration data and voila! A calibrated super-fancy motion sensor.

Dan

The Blinka _bleio library is now working on Windows, Linux, and MacOS. Some recent changes to the MacOS support in the bleak library fixed the issues we were having with _bleio on MacOS. I will also vet the Linux support on Raspberry Pi soon. I’ll have a PR soon after that, and then will start working on a Learn Guide with setup steps and examples for all the platforms.

I finished the small Airlift helper library, which helps manage ESP32 co-processors for use with WiFi and Bluetooth.

Jeff

Since I last checked in about it, I’ve made a lot of good progress on the CAN bus support for SAM E5x microcontrollers. Sending and receiving now work, as well as recovery from bus errors. The addition of filtering and 29-bit IDs is next.

In this demo, the sender waits for the buttons to be pressed and sends messages to the receiver, which displays it.

Jeff

Lucian

This past week and a half, I spent fixing bugs in CircuitPython. The most critical fix was removing a number of null reference exceptions that were occurring in displayio for I2C based screens, like the OLED FeatherWing. These were initially assumed to only be happening on the ESP32-S2, but they turned out to be present across all ports. These errors may have slipped under the radar because they only appeared when certain things went wrong – if the user typed their I2C address incorrectly, for instance, or if they forgot to include a pin by default in their constructor. Unfortunately, their reliance on hardware makes these kinds of issues tricky to unit test, and I’m still thinking about ways around that issue.

I also helped wrap up an issue that was preventing SD cards from working on the STM32, related to how ST’s SPI peripheral deals with the write line when a read is going on. There’s a particular parameter for the read function that can set a temporary output value for the write line, holding it high or low, or even putting out a single repeating byte of data, which is something SD cards require – however, most ports ignore this in their implementation. This wasn’t an issue for the NRF52, which the ST port’s SPI code was based off of, because the default for that chip works correctly with SD cards, but the STM32 had all kinds of undefined behavior. It’s possible the same issue is now happening on ESP32-S2, so I’ll be checking that out next.

I’m now moving on to bugs on the STM32 version of RGBMatrix, which should simply be a matter of inspecting a lot of data lines on the SAMD and NRF52 versions and looking for differences.

As a fun project, I finally got my CircuitPython library for the Dynamixel brand of robot servos submitted to the community bundle, and I finished my first FeatherWing:

Lucian

The board contains the basic logic needed to turn a Feather’s two UART RX and TX lines into the single half-duplex line that the Dynamixels use, as well as including a simple direction control circuit using buffers. It also lets you plug in a 12V cable directly to supply the motors, and has a built-in regulator and power source selector if you’d like to run CircuitPython off the motor power line instead of USB.

I’m looking forward to trying out some new projects, now that my robot servos aren’t tied to a fragile breadboard circuit to handle their direction control – next up is figuring out quadruped gaits!

Lucian

Melissa

This past week was a short week for me as I traveled away from the smoke that was particularly hazardous in my local area. Outside of that, I finished up writing the CircuitPython Pixel Framebuf library and got it added to the bundle. It leverages the power of the existing framebuf library and the Animated LED library to display text and graphics on many different configurations of NeoPixels and DotStars. I started writing a guide on using this library. Keep an eye out if you’re interested – it should be published soon.

If you’re too excited to wait and would like to dive right in by looking at examples, the repository is available now.

Scott

This week I’ve been doing a smattering of different ESP32-S2 related tasks to get everything ready for more and more boards. I started by fixing SPI on boards with PSRAM. I finished up the changes to Adafruit_Requests so that it works with existing libraries and the new native WiFi code.

There is a PR for adding support for different flash sizes: 8MB and 16MB, in addition to 4MB.

I’m also sorting out USB PIDs. I finished up the CI check for unique USB PIDs for boards. I’ve been helping http://pid.codes get caught up on PR merges.

Next up is polishing up the UF2 bootloader for the ESP32-S2. I’ll be writing a guide to adding your own board to the UF2 bootloader. The goal is to make it easy to load UF2 once so that all the loading after that can be done with a USB drive.

Upcoming events!

PyGotham TV

PyGotham is a New York City based, eclectic, Py-centric conference covering many topics. PyGotham TV taking place October 2-3, 2020 with a single track of talks presented online – Event Website.

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.

Hackaday Remoticon 2020

The Hackaday Remoticon will take place everywhere November 6th – 8th, 2020. It’s a weekend packed with workshops about hardware creation, held virtually for all to enjoy – Hackaday.

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

20200919 is the latest CircuitPython library bundle.

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

3.8.5 is the latest Python release. The latest pre-release version is 3.9.0.rc.2.

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

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. Kattni turns the weekly news into video form for ASK an ENGINEER and Adafruit social media. 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. You may also tag your information on Twitter with #CircuitPython.

Join our Discord or post to the forum for any further questions.