Python is one of the most popular programming languages. It’s known for its large collection of utility libraries, and because the language is interpreted on the fly, Python programs can be quicker to debug than those that must be compiled before execution. Python can be found at companies such as Instagram, Google, Spotify, and YouTube.
As Python’s domination of the desktop and the cloud continues, two camps—MicroPython and CircuitPython—are working on hardware-centered versions of the interpreted language for embedded projects such as microcontroller-based gadgets. Traditionally, the tight computing constraints of embedded hardware favors compiled languages, but more-powerful microcontrollers are shifting that equation.
CircuitPython’s development is spearheaded by Scott Shawcroft, of the open-source hardware company Adafruit Industries. (Adafruit’s CEO, Limor Fried, is a member of IEEE Spectrum’s editorial advisory board, but she had no involvement in the preparation of this article.)
“[Adafruit’s] audience is people who have never programmed in their lives,” says Shawcroft, explaining that CircuitPython makes it easy to get a simple project running. “I love folks just being able to jump right in.”
Shawcroft says he took an interest in programming in his teens as “part of the first generation that got into programming through the Web.” Shawcroft went on to intern at Creative Commons and Google while obtaining a computer engineering degree, and he joined the Google Maps team in 2009 for a six-year stint. He left in 2015 to launch a drone flight-controller company. “I made a small production run in 2016, and like 10 people bought it,” Shawcroft says, chuckling.
Shawcroft came to the attention of Adafruit’s creative director, Phillip Torrone, by participating in the company’s weekly live video series “Show and Tell,” which invites people to share their projects. “Eventually I said on one, ‘I need a job!’ ” he says.
Torrone contacted Shawcroft about porting the then two-year-old MicroPython, a leaner version of Python developed by physicist Damien George, to a particular microcontroller.
“I hadn’t heard of MicroPython, but I was instantly sold on the idea of putting Python on hardware,” Shawcroft says. “Limor said it would take about three weeks, but I did it in half that time because I couldn’t put it down.”
Adafruit agreed to set Shawcroft up with enough work to keep busy full time, and he was only to work on MicroPython. So George started receiving a lot of code submissions from Adafruit, and he had “some apprehension about us coming in and changing things,” says Shawcroft.
In talking with George about technical considerations, Adafruit realized that its perspective on the future of the language differed from his. They didn’t agree on MicroPython’s trade-off between performance and ease of use, and Shawcroft wanted to focus heavily on libraries, anticipating MicroPython as an alternative to the compiled software ecosystem that has sprung up around the Arduino family of microcontrollers.
“Damien’s going for the core C folks; he’s a firm believer that yes, Python can be fast,” Shawcroft explains. “But that’s not at all Adafruit’s audience.” Consequently, Adafruit decided to fork from MicroPython, and CircuitPython was officially born in mid-2017.
The CircuitPython community has been growing steadily since. For Shawcroft, managing that burgeoning community poses the greatest challenge in his work. “As an open-source maintainer, how do you handle it when people come to you wanting this and that to happen, especially in a rude and entitled way?” Shawcroft says.
A formal code of conduct helps. “It’s a critical baseline for any modern, civil open-source project,” Shawcroft says. “And then you have to have the teeth to back it up. We’ve wielded the ban hammer a bit.”
For those interested in contributing to a language like CircuitPython, Shawcroft says the key is practice. “Write a lot of code, and participate in communities like Adafruit as much as possible,” he says. “I used to be one of those people who said you have to love it, and that’s not fair. If you love it, it’s just easier to want to practice.”
This article appears in the April 2019 print issue as “Profile: Scott Shawcroft.”