ICYMI (In case you missed it) – Yesterday’s Python on Microcontrollers Newsletter from AdafruitDaily.com went out.
If you missed it, subscribe now! – You’ll get one terrific newsletter each Tuesday (before this post). Over 7,900+ subscribers worldwide!
The next newsletter goes out in a week and being subscribed the best way to keep up with all things Python for hardware. No spam, no selling lists, leave any time. On with the show:
Hi everyone! It’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 started!
With active development of Bluetooth capabilities in CircuitPython, here’s a spotlight on some recent community work:
iBeacons are Bluetooth Low Energy (BLE) devices used in location awareness applications such as welcoming people as they arrive at an event or broadcasting information to compatible devices at a nearby museum exhibit. The term iBeacon is Apple’s implementation of the technology and reportedly, is what they use at their stores to send notifications to iPhone users as they enter/leave the store.
Another great application of iBeacons is general automation using iOS apps such as Shortcuts and Pushcut. Some examples are turning the lights on when you enter the office or running a HomeKit scene when you leave the house.
iBeacons can be bought online, but the purpose of this short post is to reuse a BLE capable small microcontroller running CircuitPython as an iBeacon. In my case I’ll be using Particle Xenon device, but the Adafruit Adafruit ItsyBitsy nRF52840 Express or Adafruit Feather nRF52840 Express microcontrollers work just fine.
Read more – Moving Electrons.
A Scrolling LED Matrix Sign
CircuitPythonista Melissa LeBlanc-Williams has been working on a large multi-LED matrix display.
The LED Matrix Sign is a project I have been wanting to work on for the last 30 years. I saw that the Project MC2 Pink Pixel Purses were very inexpensive on Amazon, I ordered 6 and disassembled them. Other hardware includes an Adafruit RGB Matrix bonnet and a Raspberry Pi 3B+.
One goal was to run this project with Python because I wanted to easily be able to script out messages or a series of messages. I was pleasantly surprised to find the Henner Zeller RGB Matrix library. Recently working on developing the displayio library for Adafruit Blinka, which runs on Raspberry Pi and is built on top of the Pillow library, motivated me to focus on the sign project.
I got to work designing an enclosure that I could 3D print. It was designed around two 3/4 inch pieces of angled aluminum. It’s a very modular design so that I could print multiple copies of parts on multiple printers simultaneously. A couple of wall mount pieces just slide onto the aluminum. To finish the enclosure off, I bought a sheet of chemist black LED acrylic from TAP plastics.
Once I had everything physically mounted, I went to work on developing a library that would allow easy scripting of the sign. I decided to have my library work directly with Pillow so that I could have some good control of the graphics. I looked up some instruction manuals for some commercially available signs to see what their available functions were and method of programming and decided on using a single background and foreground for simplicity’s sake. The foreground consists of a canvas that expands automatically as you add stuff to it and the main sign class that allows you to set a background and has some animation functions that will apply display the canvas in various way. I plan on releasing the library on Github so that others can make use of it – Twitter Moment.
CircuitPython Deep Dive Stream with Scott Shawcroft
This week, Scott streams his work on ESP32-S2 SPI and memory.
You can see the latest video and past videos on the Adafruit YouTube channel under the Deep Dive playlist – YouTube.
Adafruit is shipping! Shop Adafruit.
Sponsor MicroPython on GitHub
Become a sponsor to MicroPython on GitHub!
Funds will go towards:
- Continued maintenance of the software
- Recruiting additional maintainers
- Offering bounties for finding and fixing critical bugs
More information – GitHub.
Python is the Third Most Beloved Developer Language in 2020 Survey
In the 2020 Stackoverflow Developer Survey, Python slips to third place in the beloved languages category, behind Rust and nearly a tie with TypeScript – StackOverflow.
The Hello Blink Show: Leading a Developer Community with Kattni Rembor
In this episode of the Hello Blink Show, Harris and Shawn interview firmware developer, hardware designer, technical writer, and community leader, Kattni Rembor. Kattni shares her insights into how she engages followers and educates her peers. Listeners will hear her advice as she delves into her experience with Adafruit and the process involved with fostering a community on learning CircuitPython – Hello Blink Show and audio.
The Adafruit Discord Server is Three Years Old!
The Adafruit Discord Server was set up on June 21, 2017! Discord has turned out to be a wonderful place for the community, including folks interested in CircuitPython, Python, and MicroPython.
The Adafruit Discord community reached over 21,294 humans this week! Join today at https://adafru.it/discord.
Grand Theft Auto: San Andreas chaos using CircuitPython
News from around the web!
A workshop clock in a micro Pelican case. It uses an Adafruit Feather M4, RTC FeatherWing, level converter, and display. It has a custom OSHpark motherboard. Functionality provided by CircuitPython – Twitter.
The 2020 Python Software Foundation Board of Directors election recently concluded. The top four are:
- Nina Zakharenko
- Dustin Ingram
- Jeff Triplett
- Thomas Wouters
Each will serve a three year term on the Foundation board – PSF Blog.
Maker caitlynsdad continues to make inspired art with NeoPixels controlled by CircuitPython – Twitter.
Using the ESP32 WiFi Manager and mDNS in MicroPython – S Doherty.
Building a kid’s eye safe smart TV with ESP32 and MicroPython – SrcCodes.
FontEdit Font Editor Targets Embedded Systems with LED, LCD or e-Paper Displays. Allows exporting developed fonts to an array compatible with C/C++, Arduino (using PROGMEM), or MicroPython/Python (list or bytes objects) – CNX Software.
Code samples for the book “Effective Python: 59 Specific Ways to Write Better Python” by Brett Slatkin are on GitHub along with an outline to learn better Python practices. You can also get the book on Amazon and other booksellers.
Structuring a Python Application – a video reference guide course to common Python application layouts and project structures for command-line applications, web applications, and more – Real Python.
Python Tea: Carol Willing on Empowering others with Python – Twitch.
Using Python list comprehensions – Real Python.
Art by Cat Robbins for the University of Bath ‘Visions of Science’ competition. This work showcases an Adafruit Circuit Playground Express and the university logo – Twitter and Zealous (you may vote for this while there).
PyDev of the Week: Adrin Jalali on Mouse vs Python
#ICYDNCI What was the most popular, most clicked link, in last week’s newsletter? Trying out our NEW BLE CircuitPython library support for desktop.
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.
There were no new boards this week (we had six last week!)
Looking for adding a new board to CircuitPython? It’s highly encouraged! Adafruit has four guides to help you do so:
- How to Add a New Board to CircuitPython
- How to add a New Board to the circuitpython.org website
- Adding a Single Board Computer to PlatformDetect for Blinka
- Adding a Single Board Computer to Blinka
New Learn Guides!
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!
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 260!
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!
Since we last spoke I’ve been as usual writing libraries, testing hardware, writing and updating guides, helping with support, and generally keeping busy.
In the library department, the last two weeks saw me:
- Complete and release the ICM20X libraries,
- Update the LPS2X CircuitPython library to include the LSP22
- Test and merge some PRs for the still-very-alpha APDS9500 library
- Start and finish the SHTC3 CircuitPython library
Hardware-wise, I assembled and tested the SHTC3 and LPS22 breakouts, mostly to allow for development of the libraries, as Ladyada had already vetted the designs while working on the Arduino libraries.
To accompany the above library and hardware work, I also did a fair amount of guide work:
- Completed and published the LIS331/H3LIS331 guide
- Update the LPS25 guide to add coverage of the LPS22
- Wrote and published the the SHTC3 guide
- Helped out with example code and assets for Kattni’s guide on the ST 9-DoF combo breakouts and wings
And lastly all the above guides I wrote or published had blog coverage written as well.
I also started research and ordered parts for a project I’ve been poking at for a while: a CAN bus board. CAN bus is robust bus standard widely used in modern cars to allow different automated things like power windows, locking systems, radios, and even the engine controls and braking systems communicate as needed.
This is only just the beginning, and CAN bus is only the most low level part of these networks, comparable to Ethernet or WiFi, so there is a lot more to do at higher levels to be able to get an idea of what is talking to what.
Now that the first version of the Adafruit_Blinka_bleio library is essentially finished, my next BLE quest is to reimplement _bleio again, this time using the ESP32 HCI interface as the low level. The ESP32 is what we use for WiFi on our AirLift boards, but it also supports bluetoothHCI, a serial protocol that is pretty standard among Bluetooth adapters. Most Bluetooth USB dongles implement it, for instance. So once I have it working on ESP32, it should also be usable for other adapters that implement HCI.
Among other things, I’ve been working on improvements to our documentation in two main areas.
First, I improved the ability to switch between the 5.x documentation and the latest documentation on ReadTheDocs with fewer “page not found” errors. Many URLs changed when we started using “autoapi” to help us generate documentation, but with configuration changes and redirects, many old URLs will continue to work automatically.
Second, I started work on removing offensive terminology from our documentation and from the names of modules and functions in the core of CircuitPython. While we are still coming to a consensus about replacement terms to use, this is something that the team agrees is important. As the draft document explaining our motivation says, “we disfavor language that due to historical and social context can make community members and potential community members feel unwelcome.”
This week I published a guide for 9-DoF combo breakouts and FeatherWings with sensors from ST. This guide includes three very similar boards that work with nearly identical code. The guide includes all kinds of information about the boards including pinouts, Arduino usage, CircuitPython and Python usage, and many resources to download, including datasheets, schematics and more. If you’ve picked up one of the new 9-DoF boards and you’re looking for where to get started, check out the ST 9-DoF Combo Breakouts and Wings guide.
Following the guide, I’m taking the opportunity to go through my assigned GitHub issues and any PRs I was tagged on. It’s good to spend some time on this every so often to make sure things are getting addressed and completed.
This past week I worked on fixing an I2C timing issue on the F7 and H7 boards, RGB Matrix testing, adding the i.MX 1050 EVK board, and a variety of other minor bugs and annoyances. As always I’m trying to learn new things about bugs as they’re resolved so I can avoid issues in the future or fix deeper structural issues that could cause more instability later on.
In my own time, I’ve been soldering together one of Joey Castillo’s E-Book Featherwing e-readers, which I’m hoping to use for a language flashcard program. I’m looking forward to digging deeper into his unicode support platform, which looks pretty handy so far! I’m always excited to see new open source designs emerge to replace devices that are usually so complex we think of them as untouchable, like tablets, phones and readers
This past week, I finished working some more on displayio for Blinka. One of the displays that I found particularly challenging was the SSD1331, despite the fact that I originally added the code to CircuitPython to get it working. The reason was that despite it wanting to accept all data as commands, sometimes it wanted commands sent as data which I found kind of weird. Using a combination of hooking up a logic probe to compare it the the Adafruit_CircuitPython_RGB_Display library and carefully comparing CircuitPython, Blinka displayio, and the RGB Display library, I was able to figure that out.
I also wrote a script for the Raspberry Pi, though it could really run on any board that supports Blinka and I2C, that will step you through calibrating a 9-DoF sensor using the command line. I’m currently working on writing up a guide page on using this script which will be one of the easiest ways to calibrate the sensor.
Since last week I’ve been focused on two ESP32-S2 tasks. The first is to finish busio by adding SPI support. It’s been much trickier than I2C and UART because the API provided by the ESP IDF is higher level than the one CircuitPython exposes. It’s highlighted memory management challenges that we ignored for the other two buses.
The second ESP related task is testing the UF2 bootloader that Thach has created. I tested it and also added the ability to double tap like other UF2 bootloaders. The double tap support requires an external resistor and capacitor to store one bit of memory because the reset button on ESP boards disables power to all ESP-powered memories.
I go over all of this in my stream from last week.
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 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 AU has announced they are holding PyConline AU, an online event, in August 2020 – pycon.org.au.
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.
20200621 is the latest CircuitPython library bundle.
Call for help – Translating CircuitPython is now easier than ever!
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 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
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.
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, 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.
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.
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.