If you missed Tuesday’s Python on Microcontrollers Newsletter, here is the ICYMI (in case you missed it) version.
To never miss another issue, subscribe now! – You’ll get one terrific newsletter each Tuesday (before this post). Over 8,876 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.
Presenting the latest Python on Microcontrollers newsletter, brought you by the community! Come join the community on Discord, Twitter, and for past newsletters – view them all here. If you’re reading this on the web, subscribe here. So much is happening – let’s dive in:
Texas Instruments Answers Questions on their New TI-84 Plus CE Python Graphing Calculator, and an Update: the Calculator uses an ATSAMD21 chip as a CircuitPython Coprocessor
In May of 2021, Adafruit saw that there was a fork of CircuitPython reported to be running on the new TI-84 Plus CE Python Graphing Calculator by Texas Instruments and they had to get one (and did!). Adafruit then reached out to the folks at TI Education / TI Calculators and asked if they could send over some questions to their team(s) and they said YES. See the questions and responses – Adafruit Blog
Plus: the calculator is running a fork of CircuitPython on a ATMEL (Microchip) ATSAMD21E18 (the same chip as the Adafruit GEMMA M0, TRINKET M0, and many TRINKEYs) – Adafruit Blog.
ADABOX 19 is shipping in July – JOIN NOW: https://adabox.com
The next ADABOX from Adafruit ships in a few days! Curated Adafruit products, unique collectibles, and exclusive discounts. Delivered quarterly. Subscribe now or give as a gift!
keypad: support for vector and matrix key scanning in CircuitPython
Dan Halbert has completed initial work on a comprehensive keypad module for CircuitPython – GitHub and Adafruit Blog/YouTube.
The keypad
module provides three different ways to scan a set keys, provided by the classes Keys
(one key per pin), KeyMatrix
(row/column matrix), and ShiftRegisterKeys
(external shift registers). Key scanning is done in the background and includes debouncing. Key transition events (pressed or released) are put on a queue, implemented by classes Event
and EventQueue
.
Microcontroller Shortages Projected into 2022
Shortages of microcontrollers, used to run millions of devices worldwide, are acute and projected to last into next year. Chips from Microchip/Atmel, Nordic, ST and others are affected. Due to timing, the new Raspberry Pi RP2040 and ESP chips from Espressif Systems do not seem as impacted at the moment.
The shortages have led developers to scour the internet for dwindling supplies. For chips that are unobtainable, some products are being redesigned using more easily available microcontrollers, which can be a costly hardware and software process – CNBC, EE News Europe, Seeking Alpha, and Bloomberg.
Camera support coming to CircuitPython on ESP32-S2
Testing the ESP32-S2 Kaluga dev kit v1.3 with the latest PR from Jeff to add native camera support to CircuitPython. In only a few lines of code it can initialize a display, read a buffer from the camera, then blit it out to the onboard 240×320 screen. There are now libraries for both OV7670 and the nicer/newer OV2640. Amazing work by the team to get this so smooth! – Adafruit Blog and YouTube.
An online editor for CircuitPython
YouTube user River Wang posts about a CircuitPython online IDE, which is web-based, requiring zero software setup. This would be ideal for any computer, but especially for machines where installing additional software is not possible such as at libraries, public spaces, and on school Chromebooks – Adafruit Blog, GitHub, YouTube and try it out here.
CircuitPython Deep Dive Stream with Scott Shawcroft
This week, Scott streams his work on MacroPad + BLE Workflow.
You can see the latest video and past videos on the Adafruit YouTube channel under the Deep Dive playlist – YouTube.
News from around the web!
DarkfullDante’s Flight Sim Switch Box is powered by a Raspberry Pi Pico running CircuitPython – hackster.io, Reddit, Imgur and Twitter.
Adafruit Trinkey QT2040 Review – Tom’s Hardware.
The I2C page for the Adafruit Trinkey QT2040 guide has the image (above) which uses the terms controller and peripheral, the page also explains the nomenclature, and references the previous naming convention. This will appear on multiple pages on the Adafruit Learning System and Adafruit documentation – Adafruit Blog.
I got a Adafruit MCP2221A breakout to play with, via The Pi Hut. USB C interface, Stemma QT / Qwiic and GPIO all accessible via CircuitPython from my laptop. Handy! – Twitter.
Using Adafruit Turtle graphics on an SSD1306 display with an Adafruit QT Py and a Seeed Xiao – Twitter Thread.
An interactive mason jar light with an Adafruit Circuit Playground Bluefruit and CircuitPython – YouTube and Twitter.
Using CircuitPython and an Adafruit CLUE to control an LPC812 creating a PSG sound source emulating a Sound Cortex – Twitter Thread (Japanese).
Using a Raspberry Pi and an Adafruit Thermal Printer – jamesg.blog and Adafruit Blog.
Make your bike smart with Raspberry Pi – Raspberry Pi Blog, Instructables and GitHub.
Raspberry Pi Zero self playing xylophone – Raspberry Pi Blog.
A one page, concise Git cheat sheet – Twitter.
Blinkenlights for flying drones at dusk are like $60 a set, and I have lots of NeoPixels and a 3D printer. Also an Adafruit QT Py and lipos aplenty. The
CircuitPython code was like 5% of the total effort – Twitter.
Raspberry Pi Pico and CircuitPython connecting a keypad. There were surprisingly few examples of this, but I’m glad that the difference with MicroPython was easy to understand. The dial pad was made quickly with reference to the article. It is a promise of HID programming that it becomes a little troublesome if you insert a special key – Twitter (Japanese).
A hack to give an Adafruit Rotary Trinkey USB key touch-sensitive knob. Just need a metal knob and a bit of wire. Demo in CircuitPython – Twitter.
An Adafruit Circuit Playground Express with some CircuitPython code inside to use it as a 3D mouse (using the motion sensor) – Twitter.
Raspberry Pico: The Complete SDK Overview (Native C/C++, Arduino, MicroPython, CircuitPython) – Sebastian on Medium.
Learn how to connect an I2C LCD display to a Raspberry Pi Pico with MicroPython – Tom’s Hardware and Twitter.
upagekite: a MicroPython/ESP32 PageKite web server – GitHub and Tutorial.
Installing Thonny for editing Python, including MicroPython for the Raspberry Pi Pico – Real Python and Twitter.
HackSpace Magazine Issue 44 takes a look at using CircuitPython libraries in MicroPython. Read more on pages 74-75: download PDF, buy now, subscribe – Adafruit Blog.
The CircuitPython compatibility layer – known as Blinka – has been around for a while and is best known for providing access to CircuitPython libraries for machines that run full-blown Python, such as Raspberry Pi computers. However, it originally started as a MicroPython compatibility layer, and it can still be used for this.
Python’s growth is “absolutely explosive,” says Anaconda CEO, and not slowing down – TechRepublic and Twitter.
Print text color and text format on Term with Python – Python Awesome and Twitter.
A curated list of 70+ Python Projects for Beginners, Intermediate and Experienced Developers – TheInsaneApp and Twitter.
How to use Python Lambda functions – Real Python and Twitter.
Sunk cost bias – keeping to invest in a complicated (sub optimal) programming language(s) while there are better ones (e.g. Python!)- PyBites Podcast.
The Linux Foundation announced a new permissive license designed to help foster collaboration around open data for artificial intelligence (AI) and machine learning (ML) projects. With CDLA-Permissive-2.0, the Linux Foundation is building on its previous efforts to encourage data-sharing through licensing arrangements that clearly define how the data — and any derivative datasets — can and can’t be used – VentureBeat.
Plan2Scene: Converting Floorplans to 3D Scenes using Python – Twitter, GitHub and GitHub.io.
pyunity: A Python Implementation of the Unity Engine – GitHub and Twitter.
Counterfeit PyPI packages with malware discovered – Adafruit Blog and Ars Technica.
Subclassing in Python Redux – Hynek.me.
Why is Python recursion so expensive and what can we do about it? – Stack Overflow and Twitter.
CircuitPython Weekly meeting for June 28th, 2021 on YouTube and notes
PyDev of the Week: Benjy Weinberger from Mouse vs Python
#ICYDNCI What was the most popular, most clicked link, in last week’s newsletter? MicroPython 1.16 Out.
The Last Word: Exit vi/vim, etc. with this one simple trick – Twitter
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 were no new boards added but several are being developed!
Looking to add 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!
DIY Quiz Show Controller System from Dylan Herrada
Adafruit Trinkey QT2040 from Kattni
CircuitPython Project Bundle
When you get to the CircuitPython code section of an Adafruit Learn Guide, sometimes things can get a bit complicated. You not only have the code you need to upload to your device, but you likely also need to add some libraries that the code requires to run. This involved downloading all the libraries, digging through to find the ones you need, and copying them to your device. That was only the beginning on some projects, as those that include images and/or sound files required further downloading and copying of files. But, not anymore!
Now, with Project Bundles, you can download all the necessary code, libraries and, if needed, asset files with one click! We automatically check which libraries are required for the project and bundle them up for you. No more digging through a huge list of libraries to find the ones you need, or fiddling with looking for other files or dependencies. Download the Project Bundle, copy the contents to your device, and your code will simply work. We wanted to make this the easiest way to get a project working, regardless of whether you’re a beginner or an expert. We’ll also be adding this feature to popular IDEs as an add-on. Try it out with any Circuit Python guide on the Adafruit Learning System. Just look for the ‘Download Project Bundle’ button on the code page.
To download and use a Project Bundle:
In the Learning System – above any embedded code in a guide in the Adafruit Learn System, you’ll find a Download Project Bundle button.
Click the button to download the Project Bundle zip.
Open the Project Bundle zip to find the example code, all necessary libraries, and, if available, any images, sounds, etc.
Simply copy all the files over to your CIRCUITPY drive, and you’re ready to go!
If you run into any problems or bugs, or would like to submit feedback, please file an issue on the Adafruit Learning System Guides GitHub repo.
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 321!
New Libraries!
Here’s this week’s new CircuitPython libraries:
Updated Libraries!
Here’s this week’s updated CircuitPython libraries:
- Adafruit_CircuitPython_ImageLoad
- Adafruit_CircuitPython_OV7670
- Adafruit_CircuitPython_Display_Text
- Adafruit_CircuitPython_EPD
- Adafruit_CircuitPython_IS31FL3731
- Adafruit_CircuitPython_ST7735R
- Adafruit_CircuitPython_LC709203F
- Adafruit_Python_PlatformDetect
- CircuitPython_Community_Bundle
What’s the team up to this week?
What is the team up to this week? Let’s check in!
Dan
By the time you read this, the keypad module will have been merged into main in CircuitPython. I’ll be writing a Learn Guide on how to use it, with examples including the new MacroPad product and reading the buttons from an SNES controller.
I’m back to fixing bugs for 7.0.0. First stop is to fix some audio problems on the RP2040.
Jeff
I merged MicroPython 1.16 into the main branch of CircuitPython. This gets us the newest bug-fixes to the core language & more.
Kattni
This week I published the Adafruit Trinkey QT2040 guide. It has everything you need to get started with your QT2040 Trinkey, including examples for CircuitPython, U2IF Python and Arduino, as well as pinouts and downloads resources. If you picked up one of these little boards and need some assistance or ideas, check out this guide!
Related, I updated the MCP9808 guide to include the STEMMA QT version of the breakout, with wiring diagrams and resource downloads now available.
I also helped write up a CircuitPython Community Code of Conduct for folks who are submitting libraries to the community bundle. Our cookiecutter
was adding the Adafruit Community CoC, but this did not make sense as it includes things that do not apply to projects maintained by community members. Now, when you use cookiecutter
and choose “Community” for the library type, you’ll get a CoC that applies to your project. If you’ve already generated a library and submitted it to the bundle, consider checking out the version now included with cookiecutter
, and updating your library with the new CoC.
Lucian
This past week I’ve been working on the updates to the “Set Next File” feature, which will allow users to do things like pick a file out of a menu and soft-reboot CircuitPython into running that file. This concept got put down for a while, and I’ve been reworking it to fit the new state of CircuitPython’s main branch with all the new additions to sleep, status LED, and run reasons.
While catching it up has been relatively simple, the concept runs aground a bit when it comes to deep sleep – since a board in true deep sleep is almost in a reset state, losing all access to RAM, we have to figure out how to store the name of the next file to run if this feature is going to work. I didn’t like the idea of having “sub-programs” simply return to the menu after using deep sleep, since that would mean they act differently just by virtue of being a sub-program; an imported example that uses sleep should act the same whether it’s been called from a menu or not. This will take a bit of extra tooling work this week, but I think the result should be worth the effort.
Melissa
This past week I mostly worked on the WebSerial ESPTool a bit more. I ended up decoupling the core code from the user interface code to make it a bit more modular and easier to use with different user interfaces. This allows it to be more extensible and work in additional ways than it was originally intended. This was important because it planned to be used in an upcoming project.
Scott
I’m back from vacation and caught up. Now I’m dusting off the BLE workflow changes and getting them ready for review. Things are looking good so the PR should be out soon. Next, I’ll be hooking up CircuitPython’s serial connection to a BLE UART service so it too is accessible over BLE.
Upcoming events!
EuroPython, the largest conference for the Python programming language in Europe, will be held online July 26 – August 1, 2021. More information at https://ep2021.europython.eu/ and the schedule is here.
PyOhio 2021 is a free event on July 31, 2021 – PyOhio.org via Twitter.
PyConline AU will be held 10-12 September, 2021 – pyconlineau
Kiwi PyCon XI, Ōtautahi Christchurch, 17th, 18th, & 19th of September 2021 CFP ends July 16th – python.nz.
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 6.3.0 and its unstable release is 7.0.0-alpha.3. New to CircuitPython? Start with our Welcome to CircuitPython Guide.
20210625 is the latest CircuitPython library bundle.
v1.16 is the latest MicroPython release. Documentation for it is here.
3.9.6 is the latest Python release. The latest pre-release version is 3.10.0b3.
2,485 Stars Like CircuitPython? Star it on GitHub!
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, Micro Center, Raspberry Pi and more.
Job of the Week
Experienced Electronics and LED technician needed for Patriotic Memorial Project in Omaha, NE (Full OR Part Time) – Art of Honor, LLC – Adafruit Jobs Board.
29,727 thanks!
The Adafruit Discord community, where we do all our CircuitPython development in the open, reached over 29,727 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
The wonderful world of Python on hardware! This is our Python video-newsletter-podcast! The news comes from the Python community, Discord, Adafruit communities and more and is reviewed on ASK an ENGINEER Wednesdays. 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.
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.