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. Here we go!
CircuitPython 5.1.0 Release Candidate 0
CircuitPython 5.1.0-rc0 is the latest minor revision of CircuitPython, and now a release candidate. If this release does not have show-stopper issues, it will be re-released as 5.1.0, the first 5.1.x stable release. Downloads are available from circuitpython.org!
New features and improvements since 5.0.0
- ulab, a numpy-like fast vector module (#2583 and others). Thanks @v923z, @jepler. Perform mathematical operations 10-50x as fast as raw CircuitPython. Enabled on almost all boards except those with SAMD21 microcontrollers. Guide: https://learn.adafruit.com/ulab-crunch-numbers-fast-with-circuitpython/overview
- Support for “f-strings”, a more convenient way to build strings dynamically. (#2690) Thanks @klardotsh, @jepler
- Enabled on almost all boards except those with SAMD21 microcontrollers.
- mpy-cross signals certain syntax errors better (#2670). Thanks @jepler
- nRF now properly handles unaligned disk reads (#2662). Thanks @jepler
- New builds of unix port and mpy-cross facilitate testing (#2672). Thanks @jepler
- STM port: add PulseOut (#2668). Thanks @hierophect
- STM port: add PulseIn (#2697). Thanks @hierophect
- STM port: fix some GPIO clocking issues (#2680). Thanks @hierophect
- STM port: rename directory to reflect the scope of the port (#2699). Thanks @hierophect
- STM port: change ST drivers submodule to match TinyUSB (#2701). Thanks @hierophect
- Winterbloom Sol: Disable USB HID descriptor (#2681). Thanks @theacodes
- Support importing native modules in native packages (#2657). Thanks @tannewt
- Document proximity and sound_level in design guide (#2684). Thanks @caternuson
- Improve argument validation in displayio (#2666). thanks @dhalbert
- Add TG-Watch02A board (#2695). Thanks @TG-Techie
- Add UARTLogger2 board (#2705). Thanks @nightskysk
- Fix DotStar status LED init (#2712). Thanks @tannewt
Thank you to all who used, tested, contributed, helped out, and participated on GitHub and/or Discord – Blog
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
The CircuitPython team is going full steam ahead in development and rollout. We’re expecting CircuitPython 5.1.0 to be stable and released soon and features for 5.2.x are being discussed. Would you like to join us? On Discord, head to https://adafru.it/discord to discuss things. And check out Awesome CircuitPython for a wide range of information.
Ed: Are you working on projects with CircuitPython or do you have good CircuitPython/MicroPython/Python news? Tag your material on Twitter with hashtag #CircuitPython. I’ll scan and include items for the next newsletter. Thanks!
HackSpace Magazine Issue 29
The new HackSpace Magazine Issue 29 presents making a frogger-like game in CircuitPython. An Adafruit Circuit Playground Express is used as a tilt-sensor controller.
The tribute to this game in the new Code the Classics Volume 1 book is called Infinite Bunner, and works in much the same way, except you control a bunny. All this hopping got us thinking about a controller. Our initial idea was that since the animals jump, so should the controller. The accelerometer can detect freefall, so it shouldn’t be too hard to convert those into button presses. However, it turns out that computer-controlled frogs and rabbits can jump much, much faster than humans can, and we really struggled to get a working game mechanic, so we compromised a little and worked with ‘flicks’.
Blog and Magazine.
Joshua Lowe has provided an update on the state of EduBlocks, a tool to make the transition from Scratch to Python easy via drag and drop Python.
You can view the new updates via https://beta.app.edublocks.org and anything will be uploaded there too.
Josh posts that “I’d really like to get some feedback from you about the changes I’ve made as this is really helpful for me to know.“ – Blog
News from around the web!
Using a Circuit Playground and Gizmo display to move a sprite on screen (with collision detection) with CircuitPython – Twitter
Bryan (@siddacious) from the Adafruit team has created an apps menu for the Open Hardware Summit wrist badge – Twitter
Clock Minima is a modular clock builder in CircuitPython. It provides simultaneous time output to REPL, LED display, and a displayio-based screen. – YouTube
CircuitPython slithers its way onto the ZynqBerry SBC – Twitter and Hackster.io
A Deep Dive into BLE Packets and Events – NovelBits
An inexpensive, indoor portable carbon dioxide meter with CircuitPython, HalloWing, and a Grove CO2 sensor – Twitter
Joey Castillo is refining a thermometer hat project using a custom SAMD21E board programmable in CircuitPython and Arduino – Twitter
Adding fire vehicle lights and sound to a child’s bed with CircuitPython – GitHub
CircUp, a tool to manage and update libraries (modules) on a CircuitPython device, has been updated to 0.0.8 with community contributed features – GitHub
Beginner’s Python Cheat Sheets, from the book Python Crash Course by Eric Matthes from No Starch Press – GitHub
A PyPortal displaying cases of COVID-19 with CircuitPython from Alvaro Figueroa – Twitter and GitHub.
A collection of programming APIs for accessing various COVID-19 related data on the web – Postman.com
6 Python Libraries to Interpret Machine Learning Models and Build Trust – Analytics Vidhya
Runtime Class Modification in MicroPython to reduce memory usage – Hyperlink Your Heart
The Zen of Python by Tim Peters – Twitter
A Python GUI with PyQT/PySide2 – Medium
Elizabeth Warren’s campaign is making its software Open Source, some of which uses Python – Slashdot and GitHub
Displaying the MicroPython REPL on displays via FBConsole – Twitter and GitHub
Programming the M5Stack Atom, using MicroPython, to transfer data to a LoRaWAN gateway with The Things Network – LeMaRiva and YouTube
PyDev of the Week – Abigail Mesrenyame Dogbe on Mouse vs Python
CircuitPython Weekly Meeting for March 30th, 2020 on YouTube and on diode.zone.
#ICYDNCI What was the most popular, most clicked link, in last week’s newsletter? We’ll make it together.
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 microcontrollers and Single Board Computers (SBC) grows every week. This section outlines which boards have been added to CircuitPython.org.
This week we had six new boards added!
Would you like to add a new board to CircuitPython? It’s highly encouraged! Adafruit has guides to help you do so:
New Learn Guides!
Chauncey the Flower Care Bot with CLUE and Bonsai Buckaroo from John Park
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 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 223!
Here’s this week’s new CircuitPython 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 an eye out here for updated download stats coming soon!
What’s the team up to this week?
The team is still working hard on updates! What’s happening:
This week I finished up the DS1841 libraries for CircuitPython and Arduino, including support for manually setting the wiper, editing and using the LUT, and enabling or disabling the temperature compensation feature. Now that we will have a log potentiometer, I hope to see more people using these handy little I2C helpers to give them programmatic control over parts of their circuit.
Next up, I’m starting the long process of migrating all of our Arduino library repositories on GitHub over to using GitHub Actions for continuous integration. Having a solid CI system is invaluable for making sure that tedious things like checking formatting and documentation are still up to snuff without relying on humans to remember to check regularly. For folks with many repositories and many contributors, a good CI system is basically required.
GitHub Actions is particularly useful because it’s well integrated with GitHub, which many folks use for hosting their projects. We have a lot of repositories, so having a common framework for CI and project hosting is going to help keep things in check.
In the Bluetooth Low Energy device-of-the-week world, I’m now working on CircuitPython BLE drivers to connect to a couple of different low-cost pulse oximeters. I am reliably getting data from one, and am working on the other.
I had a breakthrough on the SAMD51 spurious flash writes problem with the help of community members, and I am now testing a fix. It appears we just need to set the brownout voltage detection to higher than the factory preset value.
With my big projects, there’s not much to show this week. The RGB matrix code with Protomatter is slowly improving, but more work is needed to make it behave 100% like a SPI or I2C display, and to make sure we lay the best groundwork for future framebuffer-based displays.
But the little things matter too! A pull request merged this week will improve the error message when assigning to properties that are read-only. Formerly, the error would state “‘SPI’ object has no property ‘frequency’”, but in a future release of CircuitPython it will say “‘SPI’ object cannot assign property ‘frequency’”, giving a better experience when troubleshooting your code.
This week we’ve all had our lives turned a bit upside down. Remember you’re not alone in this, and the Adafruit community is here to support you. Reach out to us on the Adafruit Discord for any reason. There are thousands of people in the same situation, all continuing to gather together to support each other through this. Remember to share your projects and ideas, and continue to help others navigate this uncertain situation. We are strongest together.
I worked on updating a couple of guides with new revisions of the boards: the APDS9960 proximity, color, light and gesture sensor and the VL6180 time of flight sensor. We added STEMMA connectors to both boards, and I updated the guides with updated photos, wiring diagrams, schematics and pinouts. The guides now have everything needed to get started with your new STEMMA compatible breakouts.
We’ve also begun the process of applying to certify some of our Adafruit hardware as Open Source with the Open Source Hardware Association. We’re starting with our CircuitPython compatible microcontroller boards. Dylan has gathered the necessary info and started submitting the applications. We’ll keep you posted on the progress. We’re looking forward to being a part of the growing list of OSHWA certified Open Source projects!
This past two weeks I’ve been working on transitioning the STM32 Port over to the H7 and F7. This has been a two parter – on the one hand I’ve been adding new functionality to support the Cortex M7 and new peripheral types featured on these chips, but on the other I’ve been revisiting and fixing old and inflexible code that wasn’t built to handle chips outside of the STM32F4 series. One recent addition has been Python scripts to auto-generate peripheral code for the different variations of STM32 SoCs, as well as a revamp of how packages are managed in the Microcontroller module.
While I have my first version compiled and running on the H743 Nucleo, I’m still testing to make sure that the new changes do not break F4 builds like the Feather or Discovery boards. I’ve also been keeping tabs on other STM32 work that’s been done by others recently, such as the new NVM module for flash memory, and the low power work being done by Scott via the RTC module.
Outside of CircuitPython, I’ve been in touch with some open-source colleagues who are working on projects that they hope will combat the spread of COVID-19. I’m hoping I’ll have more updates about that soon.
This week I finished up a follow-up guide for adding new Single Board Computers to Blinka. Where as the first guide was about adding detection code so that Blinka knew which board it was working with, this guide was the real meat about actually adding your board to Blinka.
I also worked on re-skinning the Web Bluetooth Dashboard that I worked on a few weeks ago to make it match the Adafruit website much better. This was more than just changing some colors and adding a logo, but required working on developing some new panels so that it looked much better for the user.
Up to the start of this week I was continuing my work on sleep. I wrapped up STM32 and then iMX RT which went surprisingly quickly. So sleep is getting close and will need thorough testing. The PR will be out of draft once two dependent PRs are merged in.
While I wait for those PRs, I’ve swapped to BLE MIDI. I’ve got MIDI coming out of CircuitPython and I am working on getting MIDI in going. It’s been quick so far and should wrap up soon. There are a few fixes to CircuitPython core that will be needed for it. I’m excited to hack an nRF52840 into some of these old 80s era piano keyboards I have to give them midi in and out. 🙂
Once BLE MIDI is done, I’ll circle back to sleep and get that code checked in as well. Exciting times!
The PyCon US 2020 team announced planned talks, tutorials, posters, and much more online.
To participate, go to the PyCon US 2020 Remote page and subscribe to receive 5-8 email notifications over the next 6 weeks for published online content. Also you may 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 appreciate the community’s patience as they work through the logistics of gathering and uploading the recordings. The goal is to begin providing content about April 15, 2020, right when PyCon was scheduled to begin.
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 next 3-4 months, please let us know on Discord or on Twitter with hashtag #CircuitPython.
CircuitPython’s stable release is 5.0.0 and its unstable release is 5.1.0-rc0. New to CircuitPython? Start with our Welcome to CircuitPython Guide.
20190327 is the latest CircuitPython library bundle.
1.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,646 Stars Like CircuitPython? Star it on GitHub!
Call for help – CircuitPython messaging to other languages!
We recently 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 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.
The Adafruit Discord community, where we do all our CircuitPython development in the open, has grown quite a bit – now up to 17,476 humans – thank you! Join today! https://adafru.it/discord
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.
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, 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.
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.