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 get to the news!

Microsoft Garage announces Device Simulator Express upgrade with Adafruit CLUE and Python

Device Simulator Express upgrade with Adafruit CLUE and Python

Microsoft Garage has posted another upgrade for the Device Simulator Express! Device Simulator Express uses a VS code extension to program microcontollers with or without the device. The new version augments the Adafruit Circuit Playground Express simulator with support for the BBC micro:bit and the Adafruit CLUE board with CircuitPython.

Device Simulator Express allows developers to use industry-like tools to program and simulate circuit boards. This is a great way to learn more about CircuitPython and get a preview of professional developer tools such as VS Code.

Whether you have a little more downtime right now, are trying to pick up a new skill, or are looking for new ways to engage kids and students, you’ll want to try out Device Simulator Express.

You can download the free extension in the Visual Studio Marketplace. The Microsoft Garage Intern team would love to hear feedback via GitHub.

More info – Twitter and Article.

Adafruit now has the most boards certified Open Source from OSHWA

Adafruit Boards and OSHWA

Adafruit has always been an open source hardware company, predating the Open Source Hardware Association (OSHWA) certification process. We have begun submitting all of our hardware to OSHWA for certification as Open Source. Adafruit currently has 54 total boards certified, the most of any one company!!

Adafruit wishes to thank the community and all the contributors to open source software and hardware. And a special thanks to our customers for helping demonstrate you can release open-source hardware and software and be a good cause and good business.

This week twelve new boards were certified this week including:

The very last release of Python 2.7 is out

Python 2

Python 2.7.18, just released, is the last Python 2.7 release and therefore the last Python 2 release. The CPython community is saying a fond but firm farewell to Python 2.

Python 2.7 has been under active development since the release of Python 2.6, more than 11 years ago. Over all those years, CPython’s core developers and contributors sedulously applied bug fixes to the 2.7 branch, no small task as the Python 2 and 3 branches diverged – Python Dev Mailing List.

Desk of Ladyada Posts Feature CircuitPython This Week

Desk of Ladyada

Limor “Ladyada” Fried broadcasts project progress and new gear from her desk. This week, there have been two broadcasts, both related to CircuitPython:

Desk of Ladyada

First, Ladyada shows CircuitPython connecting through a cellular modem to a data source and displaying data on an OLED screen – Blog and YouTube.

Desk of Ladyada

Here, Ladyada tests out a new PR, adding support for ‘hub75’ style RGB matrices to CircuitPython. This also honors Professor John Conway, who was an amazing mathematician who recently passed away. Conway’s Game of Life uses simple rules on a matrix of data to create organic-seeming lifecycles. This 32×64 matrix is being driven by an Adafruit Feather M4, with SAMD51 and nRF52840 support coming soon – Blog and YouTube.

Deep Dive into TinyUSB on ESP32-S2 with Scott Shawcroft

Deep Dive into TinyUSB on ESP32-S2

Scott Shawcroft (@tannewt on Twitter) – chief CircuitPython developer – streamed a live session on porting CircuitPython to the new ESP32-S2 chip – YouTube.

Adafruit Update

Adafruit Heart New York

Adafruit Industries continues to run with 100% of employees being paid and continuing to work. Most are working remotely, with some working in the Manhattan, New York factory as an essential service and business under NYC Executive Order 202.6 Capabilities. Adafruit was deemed an essential service to distribute/make some PPE (Personal Protection Equipment) such as face shields, and manufacturer electronics for essential life-saving/preserving equipment and development which is needed in New York and beyond – Blog.

Face shield production continues at Adafruit – Adafruit Blog.

Adafruit has applied for a COVID-19 manufacturing grant to make masks in NYC – Adafruit Blog.

If you are looking at buying Adafruit products while the Adafruit NYC factory is closed, you can visit Digi-Key in the US and Adafruit Distributors worldwide.

Adafruit Development

The PSF Thanks Donors

PSF Donors

PyCon 2020 in Pittsburgh was cancelled due to COVID-19, and that impacted the Python Software Foundation’s (PSF) finances. On March 31st, they estimated that the PSF would need to use $627,000 of its financial reserve to get through 2020.

Since cancelling PyCon 2020, the PSF staff and PyCon volunteers have been working on PyCon 2020 Online, which is launching April 15 (more in Events below).

During the PSF planning process, they have seen an overwhelming amount of support from sponsors and registrants.

Over 40 sponsors have agreed to participate in PyCon 2020 Online and 418 individuals donated and/or converted their registration fees to donations. Thanks to generosity of individual and corporate donors and decreasing PyCon 2020 expenses, the PSF now estimates that they will now only need $141,713 from its financial reserve to get through 2020. That is 77% better than what was initially anticipated – PSF Blog.

News from around the web!

Real Python Podcast

The Real Python Podcast: Exploring CircuitPython with Thea Flowers – Real Python.

ADC Sampling in CircuitPython

Sampling an analog-to-digital (ADC) controller in CircuitPython with data graphs – Adafruit Forums and GitHub.

Building a Standalone GPS Logger with CircuitPython

Building a standalone GPS logger with CircuitPython – Moving Electrons.

Grade Crossing Flasher

A grade crossing flasher with an Adafruit Feather M4 Express and CircuitPython – YouTube.

Thermometer Hat

Additional work on the thermometer hat programmed in CircuitPython – Twitter.

Game of Life on the Pew Pew

Conway’s Game of Life ported to the Pew Pew M4 with CircuitPython – Twitter and GitHub.

A Makerfabs assembly video for the Pew Pew M4 – YouTube.

Infrared Sensor and MicroPython

Tweaking the Adafruit CircuitPython libraries for the MLX90640 IR sensor so that it can be read using MicroPython on the Pycom wipy 3.0 – Twitter and GitHub.

MicroPython Arcade

A DIY tiny MicroPython arcade cabinet with ESP32 – Hackster.io.

Hexapod Robot Simulator

Mithi’s Hexapod Robot Simulator provides a Python, numpy, and plotly based simulator for modeling hexapod robots – GitHub.

Pyboy Game Boy Simulator

PyBoy is a new Game Boy emulator written in Python, supporting macOS, Raspberry Pi (Raspbian), Linux (Ubuntu), and Windows 10 – GitHub.

Lists in Python

15 things you should know about Lists in Python – Towards Data Science.

Guide to arrays in Python – PiMyLifeUp.

The 5 most common mistakes that Python developers make – morioh.com.

Difference between Null and empty string in Python

The difference between zero and null in Python – Twitter.

PyDev of the Week: Cheukting Ho on Mouse vs Python.

CircuitPython Weekly for April 20th, 2020 on YouTube.

#ICYDNCI What was the most popular, most clicked link, in last week’s newsletter? NFC Copy Cat Cybersecurity Tool Programmable with CircuitPython.

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 was one new board added!

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

New Learn Guides!

Here are new CircuitPython guides released on the Adafruit Learning System in the last week:

New Learn Guides Using CircuitPython

Power Glove Wireless MIDI Controller from John Park

CLUE Step Counter with ST LSM6DS33

CLUE Step Counter with ST LSM6DS33 from Liz Clark

RGB Matrices with CircuitPython

RGB LED Matrices with CircuitPython by Phillip Burgess and Jeff Epler

Updated Guides – Now With More Python!

You can use CircuitPython libraries on Raspberry Pi! We’re updating all of our CircuitPython guides to show how to wire up sensors to your Raspberry Pi, and load the necessary CircuitPython libraries to get going using them with Python. We’ll be including the updates here so you can easily keep track of which sensors are ready to go. Check it out!

Keep checking back for more updated guides!

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 drivers, download the Adafruit CircuitPython Library 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! 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. Feel free to contact Kattni (@kattni) with any questions.

You can check out this list of all the CircuitPython libraries and drivers available.

The current number of CircuitPython libraries is 225!

New Libraries!

Here’s this week’s new CircuitPython libraries:

Updated Libraries!

We updated many of the libraries this week – too many to include here! Check out the Libraries section of the State of CircuitPython + Libraries + Blinka report for a detailed list.

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 an eye out here 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

A short week for me, so I wrapped up the LIS3DH library refactor to allow for the use of the H3LIS331 and LIS331HH, siblings of the LIS3DH. This type of refactor will likely become more and more common as sensor manufacturers look to expand their offerings by spinning off new products based on existing ones.

Bryan

Otherwise, I started working with the SSI2164 Quad Voltage Controller Amplifier made by Sound Semiconductor. This chip is an update by Dave Rossum to his SSM2164 with a few improvements. I’m currently pairing it with an OPA4171 to bone up on my analog skills with an eye towards building filters and oscillators.

Dan

I had to do another revision of the UF2 bootloader fixes for SAMD51, and I fixed a regression on SAMD21. The latest version now works well, and is released as v3.9.0. All the SAMD51 board Learn Guides now have pages describing how to update the bootloader, and the v3.9.0 download links are now on circuitpython.org.

I am now circling back to implementing the Adafruit BLE services needed to talk to the Bluefruit Playground app. We have an Arduino version of the board program for that app. After I finish this library, you’ll be able to talk to the app in CircuitPython as well.

Jeff

Jeff

Work on RGB Matrix support in CircuitPython continues. The initial Pull Request is accepted, but there’s still work to do to make the API easier to use. Here, I’m testing the wiring for the Feather nRF52840 Express. While the guide will focus on the Feather M4 Express—because it has a compatible shield and doesn’t require custom wiring—we’ll also include wiring guidance for Feather nRF52840 Express and Sense, ItsyBitsy M4, and ItsyBitsy nRF52840.

Kattni

This week I finished up going through the library infrastructure issues on the circuitpython.org Contributing page. There’s a series of checks that will always have something listed, but most of what can be “fixed” has been. Out of this project came some suggested updates to our Adabot script that generates the list to ensure we’re getting the best possible information on that list. The updates to Adabot are in the works thanks to Sommersoft.

We’re continuing to submit our boards to OSHWA for certification and more approvals are coming in. Check out the Certified Open Source Hardware Projects Directory to see all the Adafruit certified Open Source hardware.

Lucian

These past two weeks, I’ve been working on wrapping up the work on the STM32 H7 and F7 support. This adds the F7 series of MCUs, support for Busio, revamped organization for linker files, internal flash improvements, and some file generation scripts with Python to make adding new boards more straightforward. When merged, the STM32 port of CircuitPython will support two new boards, the Nucleo F767 and Nucleo H743, and will have dramatically improved flash performance across the entire port (simple testing suggests a 10x+ speed increase on most boards without external flash.)

The H7 series has a staggering amount of RAM, 1MB in total, so I also added more advanced memory management to its startup code, so it can take better advantage of its 480MHz processor speed. This code is similar to that used on the i.MX boards from NXP, and allows for very fast memory use via TCM (tightly coupled RAM). Without it, code on processors this fast is bogged down by instruction and data accesses and can’t make use of its full potential. The H7 is most often used for projects involving cameras or LCD screens. I’m hoping the sheer stats of this line of MCUs will allow new categories of project to be programmed in CircuitPython.

Melissa

Melissa

This past week, I was focused on getting the Onion Omega2+ working with Blinka. I had previously been attempting to get it working with OpenWRT. I switched over to using the OnionOS that comes on the board by default and I was able to get I2C and UART working in addition to the GPIO. SPI was still having some difficulty reading values even though the correct signals were appearing. I put that on hold for the moment, but expect to finish it up soon.

After that, I switched over to writing the SPI module for the external CircuitPython BitBangIO library. This is to manually flip the GPIO pins for boards that have neither the BitBangIO module or working hardware SPI. It actually worked well on the Raspberry Pi, but ran pretty slowly on the Jetson Nano. It would still work for communicating with sensors. The library is on GitHub. I will be adding an I2C module to the library soon as well.

Scott

I’m getting closer and closer to wrapping up the lower power work. While I wait for review cycles, I’ve started a couple other projects.

Last week, I took my first glimpse at the ESP32-S2 by getting TinyUSB running on the Saola dev board. I streamed my adventures last Friday on the Adafruit channels and posted it – YouTube. I’ll likely be streaming this Friday My next step is to establish the port folder in CircuitPython and start connecting the CircuitPython build system to the ESP-IDF build system. I’ve been lots of help from UnexpectedMaker and Espressif folks so thanks to them!

I’ve been reviewing lots of awesome PRs and also attending the Python Language Summit which is online just like PyCon – YouTube.

Scott

Tuesday night, Ladyada got me a dump of the USB traffic for a fever scanner. I’ve been hacking on the protocol to extract the image and the maximum temperature. The goal is to build an open source app to connect to the device rather than the proprietary Windows app that the manufacturer provides.

Upcoming events!

PyCon US 2020

The PyCon US 2020 team announces planned talks, tutorials, posters, and much more online.

To participate, Go to the PyCon US 2020 Remote page to subscribe to receive 5-8 email notifications over 6 weeks for published online content. You may also subscribe to the PyCon 2020 YouTube Channel. Expected content:

  • Recorded talks and tutorials
  • Online Summit and Hatchery programs
  • Poster presenters sharing their creations
  • Startup Row company presentations
  • Sponsor workshop videos and job postings

The organizers are working through the logistics of gathering and uploading the recordings.

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

20190420 is the latest CircuitPython library bundle.

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

3.8.2 is the latest Python release. The latest pre-release version is 3.9.0a5.

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

Call for help – CircuitPython messaging to other languages!

Hello world

We posted on the Adafruit blog about bringing CircuitPython messaging to other languages, one of the exciting features of CircuitPython 4 and later versions is translated control and error messages. Native language messages will help non-native English speakers understand what is happening in CircuitPython even though the Python keywords and APIs will still be in English. If you would like to help, please post to the main issue on GitHub and join us on Discord.

We made this graphic with translated text, we could use your help with that to make sure we got the text right, please check out the text in the image – if there is anything we did not get correct, please let us know. Dan sent me this handy site too.

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.

18,109 thanks!

18,109 Thanks

Adafruit Discord

The Adafruit Discord community, where we do all our CircuitPython development in the open, reached over 18,109 humans, thank you! Join today! 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.