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

View this email in your browser.

It’s Tuesday and that means the latest Python for Microcontrollers newsletter, brought you by the community, is here! 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 started!

Raspberry Pi as a USB MIDI Host

USB MIDI Host

USB MIDI Host

Using a Raspberry Pi with Python as a USB MIDI host! Liz Clark has her Pi connected to a MIDI keyboard and output through either a Eurorack (with a CircuitPython-powered Winterbloom Sol module) or a CircuitPythoin-powered, relay-driven xylophoneTwitter and the documentation followed.

8,000 plus subscribers, thank you!

Eight Thousand Thanks

This past week, the subscriber count for the newsletter surpassed 8,000 members, thank you! We’re glad you’ve chosen to get your Python news here!

A Cosplay Bolvar’s Mace

Bolvar‘s Mace

Bolvar‘s Mace

Another wonderful cosplay prop in progress at Kamui Cosplay – Bolvar’s Mace uses an Adafruit Feather and PropMaker FeatherWing to provide lights, shake detection and sound – Twitter.

Working in Public: The Making and Maintenance of Open Source Software

Working in Public: The Making and Maintenance of Open Source Software

A new book out this month – Working in Public: The Making and Maintenance of Open Source Software by Nadia Eghbal. Recommended by Python creator Guido van Rossum, it is an inside look at modern open source software developers and their influence on our online social world – Amazon.

Also see Nadia’s GitHub repos for interesting information on open source.

CircuitPython Deep Dive Stream with Scott Shawcroft

Deep Dive with Scott

This week, Scott streams his work on Adding PSRAM support to the ESP32-S2 port of CircuitPython.

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

CircuitPython Day is 9-9-2020

CircuitPython Day: 9-9-2020

Adafruit has chosen September 9, 2020 (9/9/2020) as the snakiest day of this year for CircuitPython Day! Much more to come on events and happenings to include a CircuitPython team livestream, collaboration with hardware and software folks, and highlighting all things Python and Python on Hardware.

This year CircuitPython Day is being dedicated to Lamba Labs Makerspace, who are helping during the Beirut disaster.

Lamba Labs Makerspace

More information on CircuitPython Day is forthcoming. Ideas? Send them via email to circuitpythonday@adafruit.com and add your event to the working calendar on GitHub.

Adding Bitmap Blitting to CircuitPython…

Bitmap Blitting

Kevin Matocha states ‘I’m learning how to contribute to the CircuitPython core code. I added a faster way of copying (blitting) bitmaps. With this bitmap.blit function it’s possible to “rainbow-ify” text.’ And, that CircuitPython Day 2020 graphics looks great!Twitter.

… and Graphics Magic

Dancing Parrots

CircuitPythonista Liz Clark also has graphics going, making versions of the dancing parrot on an Adafruit CLUE board – Twitter.

Adafruit Update

Adafruit

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

News from around the web!

Moon Phase Display

A CircuitPython-powered ePaper display shows the current phase of the moon – Hackaday.io and Twitter.

Trinket Touring Machine

Trinket Touring Machine is an Adafruit Trinket M0-based Eurorack audio module for algorithmic melody generation – todbot.com

Thermal Camera with Adafruit CLUE

Using a thermal camera with an Adafruit CLUE – displaying the output of an AMG8833 IR Array sensor on the CLUE display with CircuitPython – Twitter.

New Mini SAM Boards

New dark blue colored mini SAM boards are now available along with previous colors. Each packs a hefty SAMD51 processor and are CircuitPython compatible – Tindie and Twitter.

M60 Current Usage

The CircuitPython powered M60 Keyboard (featured in the July 14th newsletter) has very low power consumption. Only 50uA in sleep mode, 160uA when Bluetooth is connected, thanks to the nRF52840 processor – Twitter.

Raspberry Pi PS2 Keyboard Emulator

Turning a Raspberry Pi into a PS/2 keyboard emulator. Essentially the reverse of a PS/2 to USB adapter except the keyboard can come from the network and not just a USB keyboard, similar to an IP KVM, using a Python script – Twitter.

Moisture sensor and thermometer

Putting together a moisture sensor and thermometer for seedlings in CircuitPython – Twitter.

CircuitPython Tests on ESP32-S2

Testing CircuitPython 6.0.0 alpha2 on an ESP32-S2 Saloa 1 – Twitter.

Program in Python with EV3

Use your LEGO EV3 Brick to unleash the power of Python programming using MicroPython. Simply install the EV3 MicroPython image onto any micro SD card, use it to boot up your EV3 Brick and start programming straightaway – Lego.

Atlas Kit

Atlas is a kit of parts designed around helping beginners take their first steps into the world electronics and can be programmed in MicroPython – Twitter, Etsy, and micro_note.

Humble Bundle

Humble Bundle is offering a “Pay what you want” offer for programming and productivity by Mercury Learning texts. $883 worth of materials. And portion of each sale goes to the American Red Cross and Whale and Dolphin Conservation – Humble Bundle.

Python to C compiler

Writing a Python to C compiler in Python, an especially easy task to do since Python has a built in parser library and because a number of CPython internals are exposed for extension writers – Phil Eaton.

Erica Joy Baker

Erica Joy Baker, Director of Software Engineering at GitHub, is featured in a recent Olay ad with a Python script noting the STEM gap based on gender and ethnicity – Twitter.

Playwright is a Python library to automate Chromium, Firefox and WebKit with a single API. Playwright is built to enable cross-browser web automation that is ever-green, capable, reliable and fast – GitHub

Monkeypatching with pytest

Monkeypatching with pytest. Monkeypatching is dynamically changing a piece of software (such as a module, object, method, or function) at runtime. Monkeypatching is often used for bug fixes or prototyping software, especially when using external APIs or libraries – Patrick’s Software Blog and Twitter.

What is Python Used For?

What is Python Used For? 10+ Coding Uses for the Python programming language – FreeCodeCamp.org.

Poetry

Poetry: Dependency Management for Python – Poetry helps you declare, manage and install dependencies of Python projects, ensuring you have the right stack everywhere – GitHub.

range vs enumerate

Using the Python functions range vs enumerate, video – Real Python.

PyDev of the Week: Ethan Smith on Mouse vs Python

CircuitPython Weekly for August 24, 2020 on YouTube and notes.

#ICYDNCI What was the most popular, most clicked link, in last week’s newsletter? CircuitPython Takes Flight in MS Flight Simulator.

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, no new boards were added, but several are in development.

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

New Learn Guides!

title

PyPortal Hurricane Tracker from Carter Nelson

Adafruit TE MS8607 PHT Sensor from Bryan Siepert

Square NeoPixel Display with Black LED Acrylic from Noe and Pedro

Adafruit 2.13” Monochrome E-Ink Bonnet for Raspberry Pi from Melissa LeBlanc-Williams

Network Connected RGB Matrix Clock 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 266!

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 last week has seen me mostly working on the CircuitPython library for the BNO080. It’s been an enjoyable process, as things have, at least until recently, gone swimmingly. I was able to get packets sent and received over I2C fairly quickly, and not too long after I was able to get quaternion data!

It’s a testament to the utility that CircuitPython can provide to seasoned programmers that I was able to get a relatively complex sensor working so quickly. Iteration times are fast thanks to CircuitPython’s auto-reload on write functionality, and when paired with a “watcher” it’s nearly as fast as I type! What I’m calling are small programs that run in the background looking for file change events and then do something. They’re essentially the same as what is powering the CircuitPython auto-reload behavior, however in my case I have them set up to write any changes to the library I’m working on to the lib directory on my CIRCUITPY drive. All of that combined with an editor (VSCode) that auto saves, and I rarely have to wait more than a handful of seconds to see my work.

The development of the BNO080 library will benefit from this as it’s a very substantial chip with lots of bells and whistles, which means even in the unlikely event that I don’t hit any snags, it’s going to take a while to write. I’m looking forward to seeing what fun stuff I can do with the sensor. Perhaps I’ll finally start working on that autonomous glider I’ve been daydreaming about (probably not).

In other news, I got back the latest revision of the CAN Bus Feather Wing from OSH Park, and after a bit of assembly I was able to use a pair of them to get a Metro 328 talking to a feather M4 over a very simple interface. “Talking” is being generous; the Metro sends incrementing numbers and the Feather prints them out. But! It’s working! Huzzah!

Dan

While finishing up HCI _bleio work for a pull request that if I turn off the debug logging I created to help monitor the HCI commands and responses, it stops working 🙁 . I’m currently debugging this. Needless to say, bugs that go away when you add print statements to help diagnose them are harder to find. I’m now sending debug information directly to pins and monitoring them with a Saleae. I’m making progress and hope to submit a PR soon.

Jeff

I’ve started researching CAN bus. We’d like to implement it in CircuitPython for the SAM E5x series microcontrollers. So far, I’m very much in learning mode, with a small network of STM32F405 Feathers sending and receiving packets using code in MicroPython, which already supports CAN bus on the STM32 family of chips. The smaller boards in the foreground are CAN bus transceivers, which translate from logic levels to special voltages and back.

Jeff

CANbus is an interesting protocol, and the way it can reconstruct the digital signal (top two traces) from two analog signals (bottom two traces) is pretty fascinating. CANbus incorporates error detection features absent from simpler protocols like I2C. The Saleae logic analyzer is pretty handy because it provides its own decoder for the CAN protocol.

Jeff

Do you have an application for CAN bus? Know of hobbyist-level hardware that works with it? We’d love to hear about it! Drop us a note on Discord or Twitter.

Kattni

Thursday and Friday were mostly creating Fritzing objects. We have so many upcoming products, that we’re trying to get ahead on making the Fritzing objects. If you’re interested in seeing some sneak peeks, take a look at the Adafruit Fritzing library.

I have one complicated board in progress that required some changes to the component parts, and will require seeing a photo before I can complete it. I put that on hold until I receive the necessary information.

I was finally given time to do a library PR sweep. This is something that is good to do every so often, as sometimes we miss PRs or comments go unnoticed, etc. I went through all the open PRs across all of the library GitHub repos and either commented, merged, delegated or closed every PR that hasn’t seen activity in the last few days. I did quite a few on Monday, and on Wednesday the first thing I did was follow up on all the responses I received from the Monday part of the sweep. There are a large number from Wednesday waiting on replies from different folks, so I hope to be fielding that over the next week or so. I also intend to follow up on a few that I will be closing if I don’t hear back.

Lucian

This week I wrapped up the PulseOut and PulseIn PRs, and have moved on to working on some bugfixes. I’ve also received a development board for the STM32F103RE, which will allow me to help test and develop for the F1 port for STM32.

Melissa

This past week I started converting some of our shell scripts to Python scripts. I got the first two done, but I have come to the conclusion that I need to make a library with shell-like functions to make it so I don’t repeat so much code as I go along. This will also speed up the conversion process as I’m able to reuse a lot of the functions.

Melissa

I also worked with Kattni to write an eInk bonnet guide. I worked on the usage page and described how to use the eInk bonnet on the Raspberry Pi by going over a few examples, including how to force dithering for grayscale images. While I was at it, I added grayscale image mode support to the EPD library. You can check out the guide here.

I also worked on updating the Sharp Memory display guide that Jeff Epler had started. I mostly did a little light editing and verified everything was working as intended. I also added a section on the steps needed to set up the Bad Apple demo that you see on the product page. You can check out that guide here.

Scott

I’ve continued to make progress on the native WiFi APIs. I’ve added HTTPS support and fixed closing sockets so that memory is freed as needed.

My focus this week has been testing and polishing the Socket class to better handle errors. Networking has a lot of different pieces that can all cause errors, so it’s a wide variety of errors to cover. I’m making good progress though and hope to have a first version of the code out for review by the end of the week.

Upcoming events!

PyCon Australia 2020

PyCon AU has announced they are holding PyConline AU, an online event, from 4–6 September 2020 – pycon.org.au.

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 and Call for Proposals.

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 – Website and Twitter

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

20200824 is the latest CircuitPython library bundle.

1.12 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.0rc1.

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

24,688 thanks!

24,688 THANKS

Adafruit Discord

The Adafruit Discord community, where we do all our CircuitPython development in the open, reached over 24,688 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. You may also tag your information on Twitter with #CircuitPython.

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