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

View this email in your browser.

Welcome! Presenting 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.

Focus on the Adafruit CLUE Board

The Adafruit CLUE board contains a powerful Nordic nRF52840 microcontroller, a suite of sensors, and a color display on a board the size of a BBC micro:bit.

Here’s a trio of articles from makers on using the CLUE board with CircuitPython.

Monday Microcontroller: Adafruit CLUE

Adafruit CLUE

Les Pounder takes a look at CLUE and provides comparisons to the micro:bit. He demonstrates how to code the board in Arduino and CircuitPython. Finally a review of the micro:bit add-ons that work with CLUE – bigl.es and Twitter.

Using Bluetooth Between a micro:bit and Adafruit CLUE

Bluetooth comms

Using Bluetooth to talk between a micro:bit and CLUE board in MakeCode and CircuitPython respectively – Twitter thread, CircuitPython Code and MakeCode.

And Using WiFi on an Adafruit CLUE

CLUE WiFi

An Adafruit CLUE and a WiFi FeatherWing are bridged with a Pimoroni Pinbetween. This project uploads sensor stats to Adafruit IOTwitter.

Python Tea: Nina hosts Pythonista Thea Flowers

Python Tea

In this week’s episode of Python Tea, host Nina Zakharenko talks with Thea Flowers. Thea has used CircuitPython on a number of projects including modular synthesizer modules sold by WinterbloomTwitch.

CircuitPython Deep Dive Stream with Scott Shawcroft

Deep Dive with Scott

This week, Scott streams his work on ESP32-S2 busio and getting ready for the pull request.

You can see the latest video and past videos on the Adafruit YouTube channel under the Deep Dive playlist – YouTube.

Adafruit Update

Adafruit

Adafruit is shipping! Shop Adafruit.

Stop Hate for Profit

Adafruit was the second company to join the Stop Hate for Profit campaign, pulling ads from Facebook. Many more companies have joined this week – Blog.

The Language of Change

OSHWA

The Open Source Hardware Association posts a resolution to redefine SPI pin names – OSHWA:

‌The‌ ‌words‌ ‌that‌ ‌we‌ ‌use‌ ‌have‌ ‌an‌ ‌impact.‌ ‌It‌ ‌is‌ ‌time‌ ‌to‌ ‌remove‌ ‌the‌ ‌words‌ ‌which‌ ‌describe‌ ‌a‌ ‌morally‌ ‌repugnant‌ ‌relationship,‌ ‌”Master”‌ ‌and‌ “Slave”,‌ ‌from‌ ‌our‌ ‌technical‌ ‌vocabulary.‌ ‌These‌ ‌terms‌ ‌have‌ ‌been‌ ‌used‌ ‌for‌ ‌decades‌ ‌to‌ ‌describe‌ ‌the‌ ‌relationship‌ ‌between‌ ‌hardware‌ ‌components.‌ ‌Some‌ ‌of‌ ‌the‌ ‌standards‌ ‌and‌ ‌interfaces‌ ‌that‌ ‌use‌ ‌this‌ ‌terminology‌ ‌include‌ ‌SPI,‌ ‌I2C,‌ ‌Wishbone,‌ ‌AXI,‌ ‌SD,‌ ‌RapidI/O,‌ ‌and‌ ‌MIPI‌ ‌DSI.‌ ‌ ‌

By‌ ‌way‌ ‌of‌ ‌example,‌ ‌the‌ ‌SPI‌ ‌(Serial‌ ‌Peripheral‌ ‌Interface)‌ ‌protocol‌ ‌specifies‌ ‌logic‌ ‌signals‌ ‌with‌ ‌names‌ ‌including‌ ‌MOSI‌ ‌(Master‌ ‌Output‌ ‌Slave‌ ‌Input),‌ ‌MISO‌ ‌(Master‌ ‌Input‌ ‌Slave‌ ‌Output),‌ ‌and‌ ‌SS‌ ‌(Slave‌ ‌Select).‌ ‌This‌ ‌is‌ ‌unacceptable.‌ ‌

The list of names – Adafruit blog. Adafruit has preemptively been removing such language for a number of days. The music industry is following suit – Blog.

It is hoped the broader community will join in these efforts.

A Second CircuitPython Learning Guide Translated into Spanish

Guides in Spanish

The second translated guide in the Adafruit Learning System is a Spanish translation of the English guide CircuitPython Essentials: Esenciales para CircuitPython.

This joins the first Spanish guide ¡Bienvenido a CircuitPython!.

Adafruit hopes to have additional guides in native languages in the future – Blog.

Subreddits Continue to Grow

r/adafruit

The Adafruit subreddit r/adafruit surpassed 3,000 subscribers last week – announcement.

The CircuitPython subreddit r/circuitpython is very close to 1,000 subscribers.

Get your CircuitPython information fix via Reddit by becoming a member – Reddit.

News from around the web!

Tinytown Sculpture

Tinytown Sculpture

Tinytown is a palm-size light-emitting sculpture which is rechargeable and portable. A CircuitPython controller randomly and continually fades individual RGB LEDs through a range of warm colors. The piece can operate plugged to a USB outlet or untethered for more than 5 hours per recharge – Instagram.

Blinka Jump

Liz plays a game of Blinka Jump, programmed on an Adafruit PyBadge – Twitter.

Button Presses

Playing with CircuitPython and a Robo HAT MM1 to get multiple options out of a single button – Twitter and GitHub.

Blinka's Breakout

Blinka’s Breakout – a CircuitPython implementation of a game similar to Atari classic Chip’s Challenge – Hackaday.io.

Adding Voice

Adding Voice to a CircuitPython Project Using Amazon Polly. Display quotes and synthesize speech on an Adafruit PyPortal using CircuitPython and AWS Serverless – hackster.io.

Mint Tin Feather Dice

Dice rolls using an ARM Cortex-M4 Adafruit Feather microcontroller and display. Programmed in CircuitPython and installed in a mint tin – Twitter.

Browser Controlled Radio

A web browser controlled radio. This Raspberry Pi project uses TEA5767 and TPA2016 modules via an I2C bus – Reddit.

PyPortal Soil Sensor

CircuitPython + Adafruit Pyportal + a soil sensor – Twitter.

SimStapler

SimStapler – a game to simulate a stapler with a stapler and an Adafruit Circuit Playground Express – Blog and YouTube.

Controlling DC Motors

Controlling DC Motors with CircuitPython and Arduino – kingernorth.

Space Station Tracker

The International Space Station Tracker displays the ISS’ current location & trajectory using a Raspberry Pi, ePaper display, ProtoStax enclosure and Python – hackster.io and Blog.

Pycard

PyCard 2 is a SAMD21 development board that supports Arduino and CircuitPython programming – Tindie.

A MicroPython driver for a BME680 breakout board – GitHub.

Files in Python

Working With Files in Python – Real Python.

What is the core of the Python programming language? Snarky.ca

designing A/B tests using python

A growth marketer guide to designing A/B tests using Python – Towards Data Science.

PySimpleGUI

PySimpleGUI: The Simple Way to Create a GUI With Python – Real Python.

Cake

The only way to satisfy a programmer on their birthday, perhaps? Reddit.

CircuitPython Weekly meeting for June 29th, 2020 on YouTube.

PyDev of the Week: Florian Dahlitz on Mouse vs Python

#ICYDNCI What was the most popular, most clicked link, in last week’s newsletter? Building an Apple iBeacon with CircuitPython.

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.

No new boards were added this week.

Looking for adding a new board to CircuitPython? It’s highly encouraged! Adafruit has four guides to help you do so:

New Learn Guides!

title

LED Protest Sign from John Park

Pathfinder Robot Companion from John Park

Esenciales para CircuitPython from Àlvaro Figueroa

Adafruit 1.3” Color TFT Bonnet for Raspberry Pi from Melissa LeBlanc-Williams and Kattni

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

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:

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!

Bryan

This past week saw me updating the guide for the quite popular LSM9DS1 9-DoF IMU from ST. We’ve had a breakout for this capable little suite of sensors for a while and it has proven to be a favorite. Whenever you can get 9 degrees of freedom in a single package, at an affordable price, it will be popular and the LSM9DS1 is quite popular.

Bryan

With the LSM9DS1 as popular as it is, we decided it was due an update to join the Stemma QT family by shrinking it down a bit, moving a few things around, and slapping on a few SparkFun Quiic compatible Stemma QT connectors. The first version in Classic Blue is quite nice but I must admit the new one has caught my eye.

If you’re a fan of the existing form factor, fear not! We’re going to keep making the original version alongside the new Stemma QT version.

Bryan

More recently I’ve been working on a CircuitPython library for the PCF8591 ADC+DAC combo sensor from NXP. This is a fairly simple but useful little package. It’s 8-bit which doesn’t quite measure up to the some of the more high-end ADCs and DACs out there but it comes with a DAC as well and it’s relatively inexpensive as well as widely available. Having an ADC and DAC in a small package certainly has a lot of potential uses and the QT form factor will make it easy to squeeze into whatever use you find for it.

Dan

My main project now is implementing _bleio yet again (third time!). This time I’m targeting the HCI Bluetooth implementation on ESP32 (not ESP32S2), which is used on our AirLift boards. HCI is a standard serial-based command protocol that’s used for many Bluetooth-capable co-processors.

I fixed a hang in microcontroller.cpu.voltage on SAMD51. The problem occurred on some samples of SAMD51 but not others, with identical chip versions. Having two pieces of supposedly identical hardware act differently can make testing difficult.

I’m experimenting with adding a flag to request that on brownout CircuitPython simply restart instead of going into safe mode. This is useful for solar-powered devices not hang up when their batteries start to get too low.

We originally added safe mode to allow recovery when a board starts up and immediately draws so much power that the power supply voltage sags very low or shuts off. In that case, you want to be able to fix the offending program. So these are two different use cases that both need to be accommodated.

Jeff

Jeff

After failing to make progress on SDIO support with my crude setup, I ordered a development kit from Microchip with a properly wired SD card slot and an existing demo of its use that I could build from source.

This board, called SAM E54 Xplained Pro, is based on the SAM E54 microcontroller, which is very similar to the SAM D51 that is in so many of Adafruit’s boards, but was not yet supported. There is now support for this board in CircuitPython and this paves the way for other boards based on SAM E54, and I have also successfully used this board to read SD cards using SDIO from within CircuitPython, so work on that pull request has resumed.

Kattni

This week has been keeping up with miscellaneous. I assisted with the Spanish translation of the CircuitPython Essentials guide. I started the update of the guide ST 9-DoF Combo Board with another FeatherWing that was recently put into the shop. I also included a note about an issue with the silk on the 9-DoF FeatherWings (SCL and SDA are swapped on the silk, but the pins are fine!). I worked with Melissa to write up a guide for the 1.3” Color TFT Bonnet for Raspberry Pi. I also tested a few PRs and took care of some GitHub issues.

The most involved task ended up being one that I figured would take a minute or two. A while back I wrote a Learn guide for a Circuit Playground Bluefruit NeoPixel Animation and Color Remote Control. It was brought to my attention that the code for the NeoPixel Animator was no longer working. The fix was obvious: the API had changed in the CircuitPython LED Animation library and so the imports in the NeoPixel Animator code needed to be updated to match. However, once I updated the imports, I noticed the code wasn’t functioning as expected. It turns out some updates to the LED Animation library had introduced some bugs that we hadn’t encountered until this very specific use case. And, that’s how 2 minutes turns into 2 days. But, the bugs were addressed, the code now runs as expected, and the NeoPixel Animator code and guide have been updated to reflect the new import style. Thanks to Tim for helping test all the fixes!

Lucian

This past week I’ve been working on reviews and debugging on a variety of minor issues. My major project as of this week is reworking the timer system on the STM32 to be more flexible. Currently, modules can only use a single timer or a subset of timers that have been allocated for them, but that leaves too few timers for new modules like RotaryIO. The new system will share various timers between modules, picking those that are least commonly used externally for internal purposes like PulseIO timing and RGBMatrix management.

Melissa

This past week I started out by finishing updating a 9-DoF sensor calibration guide where I describe how to use a script to calibrate the sensor easily on a Raspberry Pi. You can check out that guide page.

Melissa

I have also been working on porting the PyPortal library over to Blinka. This was a fun project because it builds on top of the displayio library that I had already been working on. Since Linux already has built in facilities for things like networking, a lot of it involved stripping out things like communicating with the airlift ESP module.

Since things like displays are added onto the Raspberry Pi and not built in, I needed to add functionality to be able to define the display, so it likely won’t be quite as clean as opening examples written for the PyPortal without modification. At this point, I have the BitCoin example running and will be working to make the library more seamless.

Finally, I have been working with Kattni to write a guide for the 1.3” PiTFT Bonnet with Joystick. The learn guide should be out very soon.

Scott

This week my focus has been wrapping up SPI on the ESP32-S2. I’ve gotten TX going with DMA and RX is likely working (will test it tomorrow). Yay! I made two more changes following this. First, I enabled displayio so FourWire (SPI) displays can now be used.

Second, since I was using a Saleae to check the SPI transaction, I noticed that the display initialization was kinda slow. So, I removed a 10ms delay we used to allow the idle task to run and disabled its watchdog. I also changed the CPU speed from 160MHz to 240MHz, so that is also speedier.

Next up, I need to make a PR with all of the busio changes. After that, we need to tune up our background tasks and then we can work to releasing 6.0.0. (5.4.0 will be renamed 6.0.0 because we’re renaming I2CSlave to I2CPeripheral.)

Upcoming events!

FlaskCon 2020

FlaskCon is a community driven Flask event being held July 4th and 5th. It is intended for speakers and attendees all over the world to participate in technical and evangelical sessions related to Flask. Flask is a micro web framework written in Python – Event and Call for Papers.

EuroPython 2020

EuroPython 2020 this year will be an online conference from July 23-26. The schedule is now available – Website.

Attending the conference days will require a ticket, participating in the sprint days will be free – EuroPython.

PyCon Australia 2020

PyCon AU has announced they are holding PyConline AU, an online event, in August 2020 – pycon.org.au.

PyCon India 2020

PyCon India 2020: the premier conference in India on using and developing the Python programming language. Held online October 3-5, 2020. A call for proposals is now open through August 14, 2020. – Website and Twitter

Send Your Events In

As for other events, with the COVID pandemic, most in-person events are postponed or cancelled. If you know of virtual events or events that may occur in the future, please let us know on Discord or on Twitter with hashtag #CircuitPython.

Latest releases

CircuitPython’s stable release is 5.3.0 and its unstable release is 5.4.0-beta.1. New to CircuitPython? Start with our Welcome to CircuitPython Guide.

20190629 is the latest CircuitPython library bundle.

v1.12 is the latest MicroPython release. Documentation for it is here.

3.8.3 is the latest Python release. The latest pre-release version is 3.9.0b3.

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

Call for help – Translating CircuitPython is now easier than ever!

CircuitPython translation statistics on weblate

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

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.

21,627 thanks!

21,627 THANKS

Adafruit Discord

The Adafruit Discord community, where we do all our CircuitPython development in the open, reached over 21,627 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

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.