This week, I’m joined by Kattni Rembor, a creative engineer at Adafruit Industries. Kattni’s role is varied, as she covers embedded software, hardware design, technical writing, and community leadership.
In this interview, we talk about her work developing CircuitPython and the role mentorship has played in her career to date. She also shares her advice for anyone looking to start their first hardware project using CircuitPython.
Ricky: Welcome to Real Python, Kattni. I’m so happy that you could join me for this interview. Let’s start in the same manner we do with all our guests, with the inevitable question: How’d you get into programming, and when did you start using Python?
Kattni: Those two questions are one and the same for me. I started with programming in July 2017, and I started with Python. I was unemployed and had a lot of time on my hands.
I decided to try to learn Python. I looked around and figured the official tutorial was the best place to start. It turns out that it’s written for programmers, not beginners. I got to section four, hit a wall, and gave up.
The hardware side of things began with a sale on Raspberry Pi Zero Ws and a friend of mine giving me one. I immediately did the thing you always do after getting a Raspberry Pi, and that is to buy all the things to go with your Raspberry Pi.
I found an accessory called Sense HAT that had a bunch of sensors and LEDs built into it, but it wasn’t designed for the Raspberry Pi Zero W, so I tried to recreate it with individual sensors, which got expensive quickly.
I discovered something called Circuit Playground Express that also had a lot of sensors and LEDs built into it and figured that would work. I ordered one, having no idea that it wasn’t compatible with the Raspberry Pi. It turns out it was a microcontroller.
I got it home and took one look at it, decided it was entirely too complicated, and put it aside for two weeks before finally picking it up and plugging it in. I remember thinking, I will never write anything as cool as this demo. It was a rainbow swirl on the LEDs that played a tone for each LED that lit up.
I looked into what I could do with the Circuit Playground Express. There were three options. Arduino went right over my head, and I had no desire whatsoever to try to learn it. MakeCode was just simple enough to be frustrating. I found a single mention of something called CircuitPython and thought, Hey, I’m trying to learn Python—this is perfect!
I found an Adafruit video on getting started, got it installed, and within a very short period of time, I had a blinking LED. As simple as it sounds, nothing I had done with Python up to that point hooked me as much as that moment. For the first time since attempting to learn Python, I felt a connection to what I was doing. I had found my passion.
Ricky: Adafruit’s microcontrollers are famously embedded with CircuitPython. For those who aren’t familiar with CircuitPython, how is this different from other microcontrollers? And how has this impacted the way you instruct in workshops and with Adafruit’s Learn tutorials?
Kattni: The difference depends on which microcontrollers you’re referring to. Arduino is basically C++, often uses an IDE, and requires being compiled before you can load it onto a board. MicroPython, while a version of Python, requires complicated extra steps to get going.
With CircuitPython, you plug the board into USB, and it shows up as a USB drive. You open a
code.py file using your favorite Python editor and begin writing code. As soon as you save it to the board, CircuitPython reloads and runs the code.
You have the benefit of immediate gratification, but more importantly, of quick iteration on your code. This is the quintessential CircuitPython experience, and the capability is a requirement for a microcontroller to be considered officially CircuitPython compatible.
We focus on a user’s first experience with CircuitPython—the first five minutes. It is especially important to us that this be a positive experience, and we’ve put a lot of effort into ensuring that this is the case.
When someone can pick up a microcontroller and have a blinking LED within that five-minute period, it’s not only incredibly empowering, it’s satisfying as well. This is what makes or breaks a new user deciding to continue with CircuitPython, and I think we’ve had great success with creating that experience.
In terms of instructing tutorials, the CircuitPython experience has created a situation where I don’t have to spend half my tutorial explaining how to get set up or require participants to install a lot of extraneous software. I hand them a microcontroller, have them open an editor, and I can immediately begin going through hands-on code examples.
For the most part, it simply works. I can better utilize the time I have by being able to spend more time on concepts and content. I am also able to present the same tutorial to hardware people who may not know Python as I present to Python people who may not know hardware.
Regardless of the audience, the feedback is always positive. CircuitPython bridges programming and electronics in a way that is accessible to a wide range of people.
As for Adafruit Learn tutorials, I wrote the main Getting Started with CircuitPython guide. All other CircuitPython guides can refer to the Getting Started guide, which means authors can get right into the project or tutorial content and not necessarily have to explain the basics.
It also means we have a single place where we can refer anyone who comes to us wanting to get started with CircuitPython, and we’ll know that they are getting the information they need.
Ricky: Many of the readers at Real Python will already know how to program in Python. But they may never have considered taking on a side project with microcontrollers. What advice would you give to anyone getting into it for the first time?
Kattni: Jump in. Don’t hesitate. Picking up electronics can be intimidating, but in the end it’s using Python to manipulate the physical world. If you’re already acquainted with Python, CircuitPython will have a familiar feel.
The difference is a matter of understanding how to do the proper setup in the code to interact with the hardware. This is where Adafruit Learn guides and tutorials come in, and there are many to choose from. Find a project that speaks to you and go for it.
If you’re looking for a specific place to start, the Circuit Playground Express and its big sister, the Circuit Playground Bluefruit, are microcontrollers with a bunch of sensors, LEDs, and inputs built in. The Adafruit CircuitPython Circuit Playground library does all the setup for you behind the scenes, so you can get right to creating a project without worrying about sorting out how to communicate with an LED or a button.
The combination of this hardware and library allows you to begin to understand the interaction between the code and the hardware without needing a background in or any understanding of electronics. You can build confidence by being able to easily make your ideas a reality and then move on to more complicated projects as you progress.
Ricky: What’s been your favorite project you’ve done so far? What made that one stand out from all the others?
Kattni: This is a tough question, but consideration continues to lead back to the first project I ever did, which was a light-up, capacitive-touch tone piano. Eventually I added key limes—fruit is capacitive!—and published a guide for it titled Piano in the Key of Lime.
At the project’s center was the first Circuit Playground Express I ordered, and it was ostensibly the first piece of CircuitPython I wrote. It also led to me building a tabletop light box photo studio, running Python and using the first Raspberry Pi I received, to take photos for the guide.
It stands out for multiple reasons. The reason I started it in the first place was that the board was so new at the time that there was very little documentation. I felt compelled to create a project that I could share with others who were looking to get started. I requested to write a Learn guide to document my project for Adafruit, and I was approved.
This project resulted in me picking up writing the Circuit Playground library, which was my first real contribution to CircuitPython. The library had the three simplest features of the Circuit Playground Express written into it, and it was suggested that I add more.
I thought the suggestion was laughable. I had no background in electronics or programming, but within a few weeks of picking up both, I had submitted my first pull request to add a feature to the library.
By the time I finished the Learn guide for the project a month later, I had implemented most features of the Express and shortened my original project code from ninety-plus lines to around forty-five. I had created something that others could use to make their CircuitPython experience simpler and better. It was an amazing feeling.
It was also the first thing Adafruit ever paid me for. It would lead to me eventually joining them full time.
I began contributing to CircuitPython because I genuinely loved doing it, and it resulted in a career for me. And it all began with stumbling backwards into buying the Circuit Playground Express and deciding I was going to create this project.
Ricky: At PyOhio in 2019, you gave a talk titled “Changing Lives through Open Source, Passion and Mentoring.” How has mentorship played a role in your career in tech so far? And how have you been able to pay it forward to help others in tech?
Kattni: I attribute my career entirely to mentorship. When I started with programming and electronics, I would have been content making LEDs blink. My mentors pushed me to do things outside my comfort zone, to expand my knowledge and skills.
I learn incredibly quickly, but it also leads to me getting rapidly into concepts beyond my level, which in turn leads to me getting easily frustrated. My mentors provided guidance and support and kept me moving when I would have otherwise given up.
I learned from my mentors that I needed to advocate for myself in all things. My career began because I reached out and asked to join Adafruit, something I wouldn’t have done without significant encouragement. One of the most invaluable things I learned was that mentorship can come from anywhere, and it’s important to remain open to all possibilities, including friends.
The most amazing thing I’ve managed to do is help others realize their dreams. There are three people who work with me who attribute joining Adafruit, at least in part, to guidance from me. If you had asked me before this happened whether I could be a mentor, I would have told you “No, I have nothing useful to offer.”
It turns out that no matter what level of skill you are at, you have a story to share. I am not an experienced programmer, but I successfully navigated learning something entirely new and finding a career. These skills are worth sharing. Sometimes the most important thing you can do as a mentor is simply be supportive and encouraging.
The fact is, you do not need to be an expert in your field to be a mentor. You simply need to share your experience. No matter who you are or where you are in your career, you have been through something that someone else will face, and they will benefit from the knowledge you gained through both successes and failures.
Sharing failures in particular is especially important, as it can show someone they are not alone and that it’s possible to fail then continue on to succeed. Share everything you can with whomever you can, and you will find someone who will gain something from your experience.
Ricky: Now for my last few questions. What else do you get up to in your spare time? What other hobbies and interests do you have aside from Python and programming?
Kattni: I don’t feel like I have a lot of spare time, but regardless, the current situation has led to a lot of changes in what I do with my time. Not being able to leave the house except for essential trips has been seriously limiting.
I’m deeply interested in photography, and it’s been a while since I’ve been able to get out and do it. The last time I was able to, I visited a beautiful federal park. Needless to say, I’m looking forward to being able to explore beautiful places again and bring home amazing photos.
The flip side of that is that being unable to leave the house has also led me to pick up things I typically haven’t bothered with, like cooking dinner every day. I’ve always enjoyed my food. However, I’ll often go for take-away or simple options. Since everything changed, I have been putting together more involved meals.
I have even been putting effort into adapting complicated recipes to fit my tastes. Tonight was ginger-soy flank steak and roasted butternut squash. It’s not always so fancy—I’m also a huge fan of breakfast sandwiches on fresh bagels. Either way, dinnertime has become something worth spending time on.
Python and programming have become a huge part of my life, and that has led to it drifting into my hobbies as well. I’m currently rebuilding my tabletop light box photo studio in my second home, and this time I’m replacing the Raspberry Pi and Python with a Feather nRF52840 microcontroller and CircuitPython.
I’m trying to document it as well, something I neglected to do the first time around. It’s a remake of the second programming and electronics project I ever built, so it’s near and dear to me. Hopefully I’ll eventually be able to put something together to share it.
Thank you for joining me, Kattni. It was great to hear your experiences and tips.
If you’d like to reach out to Kattni, you can find her on Twitter. And if you’re looking to get into CircuitPython and hardware for the first time, then Adafruit’s Learn tutorials would be a great place to start. You can also learn more about CircuitPython in our Real Python Podcast interview with Thea Flowers.
As always, if there is someone in the Python community that you’d like me to interview for an upcoming community post, then leave a comment below or reach out to me on Twitter.