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

View this email in your browser.

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!

“The awesome power of CircuitPython” Empowering makers to make businesses

CircuitBiz

CircuitPython is empowering makers to make businesses. Arturo has a successful Tindie store, selling over 400+ CircuitPython powered Serpente boards.

CircuitBiz

Serpente is a tiny CircuitPython development board, perfect for quick projects and prototyping! It’s open-source hardware (OSHWA UID SE000002), and open-source software. When there are updates to CircuitPython, all the new features, enhancements, fixes, and more are automatically available for all users (downloads for the board are on circuitpython.org).

CircuitBiz

In addition to the boards being available on Tindie, they’re also available on Adafruit.com now as well. Arturo writes “Just sold my 400th Serpente on Tindie – Couldn’t have done it without the awesome power of CircuitPython!”

CircuitBiz

CircuitPython allows engineers from small businesses to large organizations to participate and thrive in an ecosystem. From the 200+ “batteries included” libraries, to content marketing, and development resources, CircuitPython is creating businesses and community together. Serpente is a real-time example to watch when open-source software and open-source hardware maximizes its potential. Over half of the 116+ boards on circuitpython.org/downloads are boards that are not made by Adafruit, it’s one of the fastest growing choices for engineers for their hardware.

CircuitPython for Visual Studio Code

VSCode

This extension by Joe DeVivo aspires to bring the entire CircuitPython workflow into a single place in VSCode. Inspired by Scott Hanselman’s blog post and the VSCode Arduino extensionVisual Studio Marketplace.

“CircuitPython: Open Serial Console will prompt you for a serial port to connect to, then it will display the serial output form the board attached to that port. The port can be changed by clicking on it’s path in the status bar. It will also change your workspace’s default board.pyi file for autocomplete to the one that matches the USB Vendor ID & Product ID. If you want to manually choose a different board, a list is available with the command CircuitPython: Choose CircuitPython Board, and also by clicking on the board name in the status bar.”

Check it out!

FreedomWing Droning with Chris Young

FreedomDrone

FreedomWing Droning with Chris Young – Twitter, and YouTube.

ATMakers.org, in partnership with The AbleGamers Charity and GRA-V Robotics, have designed a new device called the FreedomWing. It allows you to take a joystick from a power wheelchair and plug it into the device and then via an Xbox Adaptive Controller use wheelchair controls for gaming. The device is Adafruit FeatherWing compatible and open-source under an MIT Creative Commons license.”

See the previous post and overview – FreedomWing Adapter – Adapter allows power wheelchairs to control an Xbox.

Open Hardware Summit is online only

Fresh badges

Fresh badges

Fresh badges

The Open Hardware Summit is online only, Drew posted up Open Hardware summit badge photos fresh off the line – Twitter.

Trays

BLINKA

SparkFun has a nice photo of them in their trays and if you look close on each of the photo sets… BLINKA!

When there is more information on where, when, and how attendees who would have received badge can get them, we’ll include in the newsletter.

Find your way home a CircuitPython GPS Locator – The CLUE finder

CLUE Finder

Jay has a fantastic tutorial on how to make a CircuitPython GPS Locator: The CLUE finder – back7.co

“When GPS was first released to consumers, it wasn’t even in the hands or understanding of most people. Early on, it was used for pretty unique and esoteric stuff, and in the age before ultra-connected devices that use common smartphone apps, there were GPS receivers. They pretty much just displayed current coordinates including latitude, longitude, and altitude – not much else. There’s a great set of old devices over at retro-gps.info. The old units are big, heavy, slow, and use a ton of power for what they do. Modern GPS units are light, small, cheap, and use very little power. I thought it would be cool to revisit the idea. What would a newer one look like, and why not a smartphone? First, too much reliance is put on a smartphone, and without the need for maps, a smartphone is overkill (and a solved problem). Second, the device I planned to build wouldn’t need internet, and should be as easy to hack/modify as possible. We don’t need a full fledged OS either – too many moving parts…“

Guide and GitHub.

ulab: Crunch Numbers Fast in CircuitPython

ulab

ulab (pronounced “micro lab”) lets you perform number crunching tasks in CircuitPython more quickly, often around 10x as fast. This can be very handy when dealing with sensor data, as we’ll see below.

Right now, you need to get the “absolute newest” version of CircuitPython to have ulab enabled. It’ll be in the stable version no sooner than when 5.1.0 is released.

ulab is modeled after numpy, but it is not entirely compatible; so after the examples, we’ll also provide you with some guidelines to help you move between numpy and ulab.

ulab is not available in Blinka, Adafruit’s Single Board Computer layer for CircuitPython – for those boards we recommend using plain numpy since its available! If your code needs to run on both CircuitPython and Blinka, you’ll probably either need to use conditional code or forego the use of ulab altogether.

Check it out at learn.adafruit.com

IoT Design Week with Microchip’s “Wizard of Make” Bob Martin and Adafruit

IoT Design Week

IoT Design Week with Microchip’s “Wizard of Make” Bob Martin and Adafruit. We’ll be on 6pm to 7pm ET on Tuesday March 10th, 2020 (video). Expect to see a lot of CircuitPython!

EYE on NPI – Espressif ESP32-S2 SoC

ESP32S2

We are kicking off a new series “EYE on NPI” with the Espressif ESP32-S2 SoC – purchase them from Digi-Key Part Number 1965-ESP32-S2CT-ND and YouTube.

Espressif ESP32-S2 SoC modules and development boards were announced in 2019 and we’re getting closer to having these in hand. Last week, Espressif announced the beginning of mass production for the whole series of ESP32-S2 SoCs, modules and development boards, which will make their latest chips readily available to the entire IoT market.

These chips come with a great core, lots of RAM, a proven TLS+TCPIP stack, a complete development platform, and lots of code examples. If you’ve used the ESP8266 or ESP32, many elements will be familiar to you! The best new peripheral for this chip is the new USB OTG system. Yes, finally native USB comes to ESP!

ESP32S2

You will be able to use our popular TinyUSB free-and-open USB stack with these chips, to unlock USB CDC/HID/MIDI/MSC and more.

We’re also planning on porting CircuitPython to this chip. It will make for a great set of easy-to-use IoT products. We really think this chip is going to be the ‘winner’ for embedded IoT projects where cost, power and size are most important.

News from around the web!

displayio

Michael Welling is learning some CircuitPython displayio routines for the Open Hardware Summit badge app development. What is the killer app should they add? Reply on Twitter (we suggested QR codes). The Open Hardware Summit is virtual only this year, so now is a great time to participate with some code!

GoL

Brandon Satrom got PyConway running in CircuitPython and on a screen starring the one and only Blinka! – Twitter.

Cat5e

CircuitPython snakes its way to Cat5e? YES! – Twitter.

Panelizing

Kevin made a video for panelizing circuit board designs using KiCad. This one happens to be the CircuitBrains boards, powered by CircuitPython – Twitter, and YouTube.

Mini SAM

How long does it take to update to the latest CircuitPython? Less than 3 minutes and in between tweets – Twitter.

OrangeREPL

Greg got the CircuitPython REPL that xobs ported to Fomu running on the OrangeCrab – Twitter.

Steps

Blitz City DIY is working on a CircuitPython + CLUE based step tracker! – Twitter.

NovelBits

Thank you NovelBits for the Feather nRF52840 mention in this week’s newsletter! It’s one of the best Bluetooth newsletters out there! – Sign up!

Scott

Scott Shawcroft Is Programming Game Boys With CircuitPython – Hackaday.

gojimmypi

gojimmypi published their quest to get CircuitPython onto a soft RISC-V CPU on the ECP5 FPGA for the Radiona ULX3S – Twitter.

Nordic

How we build ThingyWorld for embedded world 2020 – Nordic, and YouTube.

IronHand

tieropeknots has a great Circuit Playground based light up glove, complete with Iron Man palm ring light too – Instagram.

CRICKIT

What does one call a collection of CRICKITs? A robot orchestra – Twitter.

XRAY

Sam posted great X-Rays of some boards, including the Feather-compatible Orange Crab! – Twitter.

Mohit

Some delightful creations from Mohit. A FeatherWing prototype using the Bantam Tools mill, and a classy way to display seven segments.

OnionOmega

Onion-Omega 2: Feather Adapter by TishamGitHub.

GiggleBot

Cleo QC got the new CLUE to work with the GiggleBotTwitter.

Derby

Cory’s son had Cub Scouts pinewood derby. There is a special class for the parents, so Cory made one and put a Raspberry Pi inside it. It has an accelerometer inside, and when it’s tilted for the start line, it plays a recording of an engine revving – Twitter.

ClassBit

micro:bit classroom gives educators a platform to make programming lessons more productive – classroom.microbit.org

The mysterious case of the unexplained downloads spike – piwheels.

EuroPython 2020

EuroPython 2020, the largest Python conference in Europe, has an updated website and more – ep2020.europython.eu

Watchy

ESP32 Watchy Smartwatch with e-ink display, programmable with MicroPython – Hardware on GitHub and code.

Are All Edge Devices “Servers?” by Rex.

The growth of command line options, 1979-Present.

Solar-electric atmospheric satellite – GitHub.

Magpi

Remember the discount on HackSpace Magazine and the video we did for their USA subscription launch? Some of ya’ll asked about MagPi and there is now a deal for that too! Here is the exclusive USA offer! – magpi.cc We do not receive any compensation for this, we are helping the Raspberry Pi Foundation get the word out and support a great magazine for makers.

PyDev of the Week: Tommy Falgout on Mouse vs Python

CircuitPython Weekly for March 9th, 2020 on YouTube.

#ICYDNCI What was the most popular, most clicked link, in last week’s newsletter? 116 boards on CircuitPython!

Coming soon

9DOF

LSM6DSOX IMU + LIS3MDL magnetometer 9-DoF FeatherWing. We like the quality and stability of ST’s LSM6DSOX IMU. Pair it with a LIS3MDL magnetometer and you’ve got a great little 9-DoF FeatherWing.

ST25DV

STMicroelectronics ST25DV I2C/NFC EEPROM. Say hello to the ST25DV I2C/NFC EEPROM. We saw a library for the ST25DV was released by STM32duino’s team and so we took a look at this interesting chip! It has both NFC (Type V) and I2C interfaces, you can write to the EEPROM over I2C, then read it from NFC – it even has some fast-message-passing capability that could be used for wireless near-field data transfer. Comes in 4 sizes: ST25DV04K, ST25DV16K, and ST25DV64K.

Nifty stuff! We whipped up a little STEMMA QT compatible breakout to play with this chip. You can also pick up these wireless EEPROMs over at Digi-Key.

MorseCLUE

.- -.. .- ..-. .-. ..- .. – Transmit wireless messages between two CLUE boards using morse code! – YouTube.

CLUEDo

What can the CLUE … DO? A PREVIEW! – YouTube.

New Learn Guides!

CLUE badge

CLUE Custom CircuitPython Badge from Kattni

Adafruit ICM20649 Wide-Range 6-DoF IMU Accelerometer and Gyro from Bryan Siepert

CLUE Dice Roller from Dave Astels

CircuitPython BLE Morse Code Chat from Carter Nelson

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 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 215!

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:

Library Last Week Total
Adafruit-Blinka 2026 52587
Adafruit_CircuitPython_BusDevice 1125 26657
Adafruit_CircuitPython_NeoPixel 496 8302
Adafruit_CircuitPython_MCP230xx 329 8510
Adafruit_CircuitPython_Register 243 6215
Adafruit_CircuitPython_PCA9685 148 3367
Adafruit_CircuitPython_ServoKit 141 3153
Adafruit_CircuitPython_Motor 127 3501
Adafruit_CircuitPython_PN532 127 1878
Adafruit_CircuitPython_PyBadger 85 282

What’s the team up to this week?

What is the team up to this week? Let’s check in!

Bryan

This week I’ve been working on the libraries for the ICM-20948 9-DoF IMU from Invensense. 9-DoFs on one chip is pretty nice, so I’m hard at work getting this chip supported in Arduino and CircuitPython.

One interesting thing about this chip is that the magnetometer is a separate sensor with its own I2C address. It gets more interesting: similar to the LSM6DSOX and ICM330DH, this sensor has an external/master slave bus that it can use to communicate with and get data from other sensors. Normally this would be an interesting but ultimately situational feature. However, in the case, the ICM-20948 magnetometer is on the external bus. This means that getting all 9 DoFs requires setting up registers in the ICM20948 to configure the magnetometer and then map its output to another register! It was a bit tricky to figure out but there is a good reference library written by the folks at SparkFun that I was able to use to figure out the S33KR3T C0D3 to get the magnetometer configured properly.

Next up, I’ll be working on the tester code, which will require me to add a few more bells and whistles to the Arduino library to test all the pins without needing to have a convoluted testing setup. Once the hardware is fully verified, I’ll move onto the CircuitPython library which should be fairly straightforward now that I’ve figured things out while writing the Arduino library.

Dan

CircuitPython 5.0.0 stable is released! 5.0.0-rc.0 came out a week ago. The build process was failing to upload all the board builds to GitHub reliably; the GitHub release pages are not really designed for the over 1,700 release assets we now have per build. For rc.0, I upload the missing builds manually. I then arranged for circuitpython.org to point to our Amazon S3 downloads site, which handles the bulk uploads much more easily. I released 5.0.0-rc.1 over the weekend to test the new downloads, and included a few i.MX fixes as well. The 5.0.0-rc.1 release seemed fine, so I made the 5.0.0 stable release on Monday. This is a huge milestone! Thanks to everyone who has worked on or tested 5.0.0 since we started working on it last July.

This week I’m going to be reverse engineering the radio traffic of a couple of BLE-enabled BBQ thermometers to see if we can figure out how to communicate with them. I also have several issues with the UF2 bootloader to look at and debug.

Jeff

Jeff

Subsequent to the 5.0.0 release, the pull request to add ulab to CircuitPython was incorporated. This paves the way for an upcoming release, probably 5.1.0, to include it for most SAMD51 and nRF52840 based boards that support CircuitPython. You can get it right now by using the “absolute newest” downloads from CircuitPython.org, and the ulab docs are also live on readthedocs.

This will be a boon for many types of number crunching routines in Python. For example, converting the “normalized_rms” function from an existing guide took just a few minutes, and performs about 10x faster. Drop us a note on Discord if you know of a library or guide that could be improved by the use of ulab.

Kattni

This week I published a guide for the CLUE Custom Badge!

Kattni - CLUE Badge

The new custom badge feature of the Adafruit CircuitPython Pybadger library makes it super simple to display lines of text over a color-block or image background. The guide includes an example of creating a custom badge for CLUE that shows your Twitter handle, name, job title, and pronoun. As well, it covers everything you can customise about the badge and how to do it. If you’re looking to create a super customisable badge for your next event using your Adafruit CLUE, this guide has you covered!

This project is also part of PyCon 2020 preparation. Adafruit and Digi-Key are pairing up to sponsor PyCon and provide a CLUE to every attendee. Now it will be easy to create a custom badge to show off during the conference on your new CLUE.

Lucian

This past week I wrapped up my work on PulseOut and my Zephyr learn guide, and moved on to working on PulseIn (the IR pulse detection module for Circuitpython) and researching/preliminary work on the H7 and F7 processors offered by ST. I’m especially excited about these new MCUs given their use on boards like OpenMV – machine vision is something I enjoy tinkering with on my personal projects, and the opportunity to open up CircuitPython to these kinds of modules is very exciting.

It’ll also be fun to see Circuitpython on some of the most powerful chips offered in the Cortex M4/M7 market. I’ll be quick to retry all the projects that have been sluggish for me in the past, and see how they perform on a system running at 400MHz!

Melissa

Melissa

This past week I finished up the Web Bluetooth dashboard and added a few more services such as being able to change the color of the NeoPixels, being able to manipulate a 3D Model on screen and playing a tone from the board. In addition, the Feather Bluefruit Sense came out and it worked great with the dashboard. I also added some more polish to application such as throttling the Frames per Second so it worked smoother.

After finishing that up, I wrote up a guide on using the dashboard. You can check the guide here. Next I’ll be working on a version of the dashboard that works by monitoring BLE advertisements.

Scott

I was in Colorado at the end of the week. Thursday I visited SparkFun and met up with Great Scott Gadget folks to chat about CircuitPython. Thanks to everyone for taking the time to chat!

When I got back, I had some email catch up to do and then helped a bit with releasing CircuitPython 5.0.0! Please update and let us know how it goes!

I’ve also been helping with the BroadcastNet demos that John Park has been doing.

The rest of this week, I’m heads down on optimizing CircuitPython’s power consumption, so that BroadcastNet sensors and conference badges last longer on their battery charges. The main goal is to make time.sleep() actually go into a low power state. I think I can reduce the power consumption during sleep by a factor of 10, so that should be handy.

Upcoming events!

Lamba

For International Women’s Day, on March 21st, the Lamba Labs Beirut Hackerspace will have a workshop to learn how to design, code and implement a hot potato gamified snowglobe with CircuitPython.

Pycon 2020

April 15-23, 2020, Pittsburgh, Pennsylvania, USA – The PyCon 2020 conference is scheduled to take place in Pittsburgh. It is the largest annual gathering for the community using and developing the open-source Python programming language. It is produced and underwritten by the Python Software Foundation, the 501(c)(3) nonprofit organization dedicated to advancing and promoting Python. Through PyCon, the PSF advances its mission of growing the international community of Python programmers – PyCon 2020.

Latest releases

CircuitPython’s stable release is 5.0.0. New to CircuitPython? Start with our Welcome to CircuitPython Guide.

20190307 is the latest CircuitPython library bundle.

v1.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.0a4.

1,618 Stars Like CircuitPython? Star it on GitHub!

Call for help – CircuitPython messaging to other languages!

Hello world

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 – 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.

16,884 thanks!

16884

Adafruit Discord

The Adafruit Discord community, where we do all our CircuitPython development in the open, reached over 16,884 humans, thank you! Join today! 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. Join our Discord or post to the forum for any further questions.