ICYMI (In case you missed it) – Tuesday’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 8,000 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.
Hello and welcome to 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!
CircuitPython Takes Flight in MS Flight Simulator
For many years, I have used and played in Microsoft Flight Simulator X. In anticipation of the upcoming release of the new version – Microsoft Flight Simulator 2020 – I wanted to ensure I had the best set up ready for flight! I knew that CircuitPython had a gamepad software library that makes your CircuitPython code appear like a Joystick. I had an idea that this could be hacked up (easily) and make to suit my purpose. CircuitPython also makes working with hardware easy.
The CLUE Cutebot
CircuitPython-CLUE-Cutebot is a higher-level CircuitPython library to allow Adafruit’s CLUE and ElecFreak’s micro:bit Smart Cutebot to communicate while maintaining all the functionality of the CLUE, except for touch features – GitHub and YouTube.
I am a teacher of young learns and as such the code was purposefully left simple so I can use it with them. There is also a comment on nearly every line to help explain to my students what each line is doing.
A 14-segment Internet Display
A somber scoreboard keeps real-time tabs on COVID-19 and other such adversaries – the big board of death. This project uses 21 custom HT16K33 14-segment display modules driven from an Adafruit Feather M4 Feather, which has 4 I2C buses to drive so many displays. The microcontroller is mated to an Adafruit AirLift FeatherWing to connect to WiFi. Data is collected via JSON format and displayed on the board – Hackster.io and Twitter.
The display boards are custom and the design is available – GitHub.
A Telescope Drive Controller
The source code and design schematics for a simple telescope drive controller for a telescope with basic stepper motor drives. The controller uses an Adafruit M4 Feather Express microcontroller and the Adafruit Stepper + DC Motor FeatherWing motor drive. The software is written in CircuitPython – GitHub.
bip – using Python with IDA
Bip is a project aimed to simplify the usage of Python for interacting with IDA. Its main goals are to facilitate the usage of Python in the interactive console of IDA and for writing plugins. In a more general way, the goal is to automate the recurrent task done through the Python API. Bip is also developed for providing a more object oriented “Python-like” API and real documentation. It includes both the traditional API and the hexrays API – GitHub and Twitter.
CircuitPython Deep Dive Stream with Scott Shawcroft
This week, Scott streams his work on ESP32-S2 TLS web access and memory – YouTube.
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
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.
It was with great sadness that the community saw the devastation of Beirut several days ago. So many residences were heavily damaged. It was a great relief to hear from our 2019 CircuitPython Day partners Lamba Labs Makerspace:
Things have been quite tough these days, but so far all manageable. We did a roll call yesterday on all our maker communities. Aside from minor injuries and stitches, broken glass, broken window frames (aluminium and wood), and some broken cars, no real harm done. All the love from here in Beirut.
Adafruit is dedicating CircuitPython Day 2020 to Lamba Labs and supporting NGO fundraising for the city:
– Impact Lebanon fundraiser: their focus is rebuilding lost homes, houses, historic landmarks, and affected hospitals.
– Anera and Global Shapers fundraiser: an NGO which is coordinating with 12 NGOs including Red Cross Lebanon division and Caritas. Their main goal is collecting funds to sustain the affected families until they can financially recover from the explosion.
More information on CircuitPython Day is forthcoming. Ideas? Send them via email to email@example.com.
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.
Menus on CLUE
CircuitPython_CLUE_Menu – make your Adafruit CLUE multi-functional by adding a nifty startup menu to select the program you want to run. You no longer need to rename your files to code or main to run them. Simply drag and drop your files into your CIRCUITPY drive and this menu program does the rest – GitHub and YouTube.
The Keyboard FeatherWing
After a long process of designing, production, and testing, the CircuitPython-compatible Keyboard FeatherWing from arturo will be ready to go on sale.
On Tuesday, August 18th, he will submit a Tindie listing, and depending on how long they take to approve it (usually not more than an hour), it should be available around 7 PM Central European Time here (note, the link won’t work until the listing is approved).
M4 Capacitive Touch
A video example with complete code of Adafruit CircuitPython on M4 chips doing capsense touchio – Twitter.
Simulating firefly flashes with NeoPixel LEDs in CircuitPython – GitHub.
Using Blinka on the Zynq
And Blinka on Odroid XU4
Scripts for using an ILI9341 LCD with an Odroid XU4 in Python via Adafruit Blinka and CircuitPython – GitHub.
New CircuitPython Books
Two new books on using CircuitPython:
- Ten Games for the Circuit Playground Express
- Make Music with the Circuit Playground Express: Twelve projects that make music, sound and noise
Model Train Control
Model Train Speed with CircuitPython & Arduino – YouTube.
Season of Docs
MicroPython was accepted as an organization for Google Season of Docs! This means that there will be a dedicated three-month resource allocated to improving the MicroPython documentation. Read the list of MicroPython Season of Docs Project Ideas and take a look at the other accepted organizations – Google.
The latest TTGO Watch has been released on Tindie. The watch is based on an ESP32 with a colour 1.54” display with touchscreen. It’s proven popular in the MicroPython forums with a couple of repositories created to support the device – Tindie.
Wasp-OS for the PineTime
Daniel Thompson continues to improve his MicroPython-powered wasp-os project that aims to bring a powerful, free and open source platform to the nRF52832-powered PineTime watch. His videos are a great way to get a sense for what’s currently possible with this exciting project. Particularly cool – Daniel recently covered how the heart rate monitor feature was developed – GitHub.
MicroPython has had a couple of awesome lists but mcausers Awesome List must be the most awesome of them all! There are a couple of hundred curated links to libraries and tools, all with brief descriptions and grouped logically. Contributions are welcome!
The tiny Blyst 840 nRF52840 module is amazingly powerful – and did we mention that it’s absolutely tiny? The creator, Hoan Hoang, has continued his support for MicroPython by submitting ports for the module and for the associated development boards – CrowdSupply.
Reading a PS/2 Keyboard
Game of Life
SPI LCD Writing
Speeding up line rewriting of monochrome liquid crystal (LS027B4DH01) with MicroPython (ESP32) using SPI communications – ymt-lab.
MicroPython and MQTT
Melbourne MicroPython Meetup
Matt has published the last couple of Melbourne MicroPython Meetup News Roundups; read more about what’s been happening in the MicroPython community in Australia and abroad.
General Python News
ulab Samples – links, examples, benchmarks, etc, about ulab module, a NumPy-like array manipulation library for MicroPython and CircuitPython – GitHub.
What Are Python Wheels and Why Should You Care? – Real Python.
Python Tea #10: Special Guest Lukasz Langa on release management, typing in Python, asyncio, MIDI, Synths – Twitch.
Network Programming with Python Course (build a port scanner, mailing client, chat room, DDOS) – YouTube.
MyDev of the week: Jason R. Coombs on Mouse vs Python
Information from Last Week
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 some are in the works.
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 266!
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 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!
Last week saw me wrap up the MS8607 and move onto the CAN Bus feather. Unfortunately, as it turns out, I made a mistake while ordering the board and it came back from OSH Park just as I had requested it, bugs and all.
I’ve ordered a new, bug free board and, in the meanwhile, have switched gears to looking at the BNO080 from Hillcrest Laboratories. This is a sensor closely related to the BNO055 by Bosch Sensortec. In fact the BNO055 and BNO080 share the same hardware and only differ in the sensor fusion algorithms running on them and the company supporting them.
Due to a unique partnership with Bosch, Hillcrest Labs is able to base the BNO080/BNO085 on a Bosch sensor (BMF055) running Hillcrest Labs’ proprietary SH-2 software. The Bosch equivalent is the BNO055. Though both can be used in inertial sensing applications, choose the BNO085 for applications that demand high dynamic accuracy, low latency, and context/event classification. For embedded applications, the BNO080/BNO085 also includes RTOS support.
If you’re not familiar with the BNO055, it is very interesting and fairly unique sensor package. Like other high end motion sensors, it includes an accelerometer, gyroscope, and magnetometer, all with three axes for a total of 9 degrees of freedom. Unlike other sensors, it also includes a Cortex M0 processor running a sensor fusion algorithm that does the heavy lifting of taking all of the raw sensor data and calculating useful measurements like absolute orientation and vectors for angular velocity, acceleration, and magnetic field strength.
An interesting difference between the two is the communication protocol that the BNO080 uses to communicate with the host. Communications take place using a packet based protocol that rides on top of the the underlying USART, I2C or SPI transport layer. Writing the support code to handle that should be an interesting challenge.
I now have HCI _bleio working completely for Nordic UART as a peripheral. This means I can use the Bluefruit LE Connect app to talk to CircuitPython over BLE using an ESP32 co-processor, available on, for example, the M4 Airlift or the PyPortal. It is satisfying to finally see an end-to-end test working after being head down in this code for weeks. I have a little cleanup to do but will be submitting a PR soon.
I’ve continued working on the Sharp Memory Display PR, which was recently merged. STM32 support for SDIO was also belatedly merged after some neglect. I also did further work to reduce memory usage on M0 boards so that we could add a new Japanese translation of the core.
Over the last week, I’ve created a number of Fritzing objects, some Fritzing wiring diagrams, updated a couple of guides, and created the beginnings of a guide for Ladyada to finish up. I also took care of plenty of miscellaneous items I have had on my list, including adding the CircuitPython Library cookiecutter to our Adabot script so the issues and PRs are included in our tracked list.
I created a new role on the Adafruit Discord, at the suggestion of Hierphect (Lucian): PCB Helpers. I invited three community members who have been helping out a ton in the #pcb-design channel already – Hierophect, deshipu, and electronic_harry. If you’re interested in PCB design, but have questions about where to get started or how to optimise what you’re already working on, feel free to check out the #pcb-design channel and get assistance from the new Helpers.
I spent a couple of hours on Friday working with John Park to learn more about Adobe Premiere, which I use to record the newsletter video recap. I’ve been meaning to do this for a while. There are parts of the videos that are identical across all of them, and so it makes the most sense to record these sections once, and then create reusable assets for adding to subsequent videos. I put it off for ages, and finally got around to making the time to learn how. Now I just need to find the time to do it…
This past week, I wrestled with the PulseIO module on the ESP32-S2, which ran into some speed bumps related to the internal buffer system on FreeRTOS. In general, I’ve found that the ESP32-S2 documentation has been high quality, but there are occasional moments where they designed a system to be used at a higher level than what Circuitpython needs – these cases can require wrangling with some highly abstracted internal code. But despite getting briefly bogged down with the IR receiver, I’ve finally gotten it to start spitting out the required data, and I’m moving on to cleanup and API fixes for the rest of the module.
I’ve also been looking at some various documentation and website changes, such as fixing the tendency for old APIs to show up first on Google, and reworking the build flags system to be consistent across all ports. I’m also waiting for a new STM32F103 development board to arrive so I can assist with fixing the flash system and getting that port submitted proper.
Over this past week, I finally got the MatrixPortal library merged in and it is now part of the bundle. If you’re interested, you can take a look at it here. It has also been used in a project that has a learn guide written. You can check out John Park’s On Air sign. I’ve been working with John Park to write some additional demos using this library, so be sure to catch John Park’s Workshop each week to learn more.
Another big project that I have been working on is to try and get the STM32MP1 working with Blinka. I spent some time building a custom Debian image so that installing Blinka on it would be much easier. Although the image currently isn’t working, I am working with an engineer on the Digi-Key forums to figure out the issue and then I can resume getting it working.
In the meantime, I’m working on porting the PiTFT installation from a shell script over to Python so that it will be simpler and easier to add new displays and maintain.
I’ve made a lot of progress this week! I fleshed out the ipaddress module, got ping working and the core of socket needed for TCP working. I’m able to fetch HTTP websites and will be adding HTTPS support soon.
The filesystem bug I was hitting the last few weeks was really slowing me down so I decided to tackle it head on on Monday. It turned out to be simpler to debug and fix than I expected. So, the fix for that is already checked in and it’s full speed ahead on the core socket APIs.
PyCon AU has announced they are holding PyConline AU, an online event, from 4–6 September 2020 – pycon.org.au.
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: 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
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.
20200817 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. Community member ciscorn recently contributed a translation of the core into Japanese.
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.
The Adafruit Discord community, where we do all our CircuitPython development in the open, reached over 24,629 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 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. You may also tag your information on Twitter with #CircuitPython.