How do we get kids excited about programming? Make programming tangible with embedded devices.
Did you know that after kids learned to code with the BBC microbit, 90% of them thought that coding
was for everyone, and 86% said it made CS topics more interesting? One person doing great work in
this space is Nina Zakarenko. She's here to tell us all about her projects with CircuitPython.
This is Talk Python to Me, episode 221, recorded June 24, 2019.
Welcome to Talk Python to Me, a weekly podcast on Python, the language, the libraries, the
ecosystem, and the personalities. This is your host, Michael Kennedy. Follow me on Twitter
where I'm @mkennedy. Keep up with the show and listen to past episodes at talkpython.fm,
and follow the show on Twitter via at Talk Python.
Hey, everyone. Before we get to the interview, I want to quickly tell you about a new course
we just launched. It's our first major Flask course, and it's called Building Data-Driven
Web Apps in Flask and SQLAlchemy. This one's a deep dive into Flask. We cover things like
routing models, templates, databases, and migrations, and even deployment and security. And we do
all of this in the context of building a clone of the pypi.org website. Check it out over
at training.talkpython.fm. If you're not sure if you want to choose Flask just yet for your
web app, then give our 100 days of web course a look. We cover many frameworks and programming
models in 25 four-day projects, so you get a super wide view of what's out there. Then you
could pick Flask or Django or Pyramid or something else. Thanks for checking it out. Now let's get
to the interview. Nina, welcome to Talk Python.
Hi, thanks for having me.
It's great to have you here. You've been on Python Bytes, but not Talk Python before,
so I'm really excited to talk about some of the really cool stuff you did at PyCon, at
some of these other Python conferences, and with hardware and embedded Python and a lot
of cool stuff you're doing.
I'm really glad to be here, and we're recording a special episode from Portland for my home office.
That's right. Yeah, we both live in Portland, so doing it live, it's going to be great.
So before we get into embedded Python and circuit Python and all these sorts of things, let's just
start with your story. How did you get into programming in Python?
It's a little bit of an embarrassing story how I got involved in programming in the first place.
I was lucky to develop an interest from a young age. So when I was about 11 or 12,
I found out about the band Hanson. You remember that?
Yes, yes. I remember Hanson. The boy band, right?
Yes. And I really didn't like them, and I wanted everyone else to know. And so I figured out HTML
and figured out how to put up a Geocities site so I could put some stuff on there, some animated GIFs.
Geocities, people might not even remember Geocities, right? Those were early days. If you just had a
website, people were impressed. It didn't matter what it was.
Yeah, it was like free single-page web hosting. And I think it really kind of changed the landscape
of the internet, right? It made programming, even simple things like HTML, something that was
accessible to a lot more people.
For sure. So you had this thing against Hanson.
Yeah.
All right. How did that get you to programming?
There weren't really a ton of good resources out there. There wasn't GitHub where you can just go
and look at somebody else's source code. And so I just started out by right-click,
view source, pages that I liked, and figuring out how they did it. And then figuring out how
HTML was structured and all of that. And that kind of started my curiosity. So I did go a more
traditional route and went to school for computer science. And I've been in engineering ever since.
Yeah, that's really awesome. So how'd you get into Python from there? Because Geocities and
HTML and vSource, that's all just the web brand and stuff.
There was some period in my life where I called myself a full-stack developer,
but I was always that half-drawn horse full-stack developer.
Yeah?
Yeah, where I just naturally gravitated more towards back-end programming than front-end.
So I learned Java in school and then I did enterprise Java for a really long time and
worked on some really boring software.
Yeah? A lot of forms over data and data entry and all that kind of stuff?
Yeah.
You know, financial software. I worked on software for satellite control computers when I worked at HBO.
And I didn't really kind of lost touch with software being fun, you know, or software kind
of having creative purposes. I would just go to work and feel drained. I didn't really know much
about open source or the open source community. And at one of my jobs, I was doing my enterprise Java
thing. And we had started using Python for a little bit of scripting and for the API. And so I started
dabbling in that. Had the opportunity to go to PyCon. So my first PyCon was seven years ago.
And I was just kind of dreading it, you know, I was like, I'm going to be a noob in this thing and
I'm going to get made fun of, or people are going to call me out and it's just, it's going to be so
horrible. And then I showed up and I was just overwhelmed with how friendly the community was.
Yeah. I had the same experience, you know, just when I was getting into Python, I thought,
you know, it was rough. And you said you came from Java, like I came from C# and
I was really good at it. And I'm like, I'm going back to being like a true beginner,
like where I'm just going to make all these stupid mistakes. And, you know, people were super
supportive and friendly. And I really thought it was a special place, right. And just made me want to
get into it even more and so on. Yeah. I came back from my first PyCon and I was like,
how do I do this more? Because people were, you know, they weren't just kind of friendly to me and
welcoming to me. They were really generous with their time as well. So one of the first sprint
projects that I worked on as someone that I had met, who is an engineer at Google, you know, instead of
sprinting on a big, fancy open source project, just sat with me and helped me talk through some of the
issues I was having with my own code. And I was just, I mean, I was floored, right?
Yeah. Yeah. Why is this person who's like such a high end developer messing with my stuff, right?
Yeah. But they were so, you know, happy to do it.
Yeah. That's awesome. That's definitely kind of epitomizes what the Python community is like and why so
many people stay, stay and love to work there.
And I try to pay it forward, you know?
Absolutely. And I definitely do think you do. And it's worth pointing out that you gave the closing,
was it the closing keynote?
It was.
At PyCon?
Yeah.
Yeah. So you were basically, you stressed out the whole PyCon.
Yes.
Because at least for me, like we were talking earlier, like it's, it's hard to relax if you're
giving conference presentations and stuff until they're over. And you know, if you're the last
one, you've got to just like hold your breath off, PyCon. But it was a great presentation. You
talked about some really cool ideas about making programming fun again and personal and maybe
creative and not necessarily just for closing JIRA tickets or whatever, right? So nothing
wrong with that. Like it's great to do programming as work. And a lot of times it is fun, but a
lot of us have jobs where it's not exactly the reason we got into programming, right? So it's
cool to do really useful stuff or really playful stuff, I guess, rather not useful stuff, maybe
even. And so one of the themes of your talk that I wanted to start off with and discuss with you is
you said like software doesn't have to be serious. What's the story of that?
Not a lot of people know this about me, but now they will. When I was in high school, I was just
totally goth, you know, just had dyed black hair. I had a lot of piercings. And when I graduated
college, you know, I was like, nobody is going to give me a job if I look like this.
Yeah. I can't work at IBM. Like where's the formal dress code of this place is not going
to match with me, right?
Yeah. Okay.
I didn't know anything about startups. I didn't even really know anything about
how to go out and get a job after I got my degree. And so I just kind of toned it down and also got a
really dry job in the financial sector because they were the first ones to take me out to a nice
dinner. And I was like, whoa, you know, so I just kind of fell into it without really knowing
what I was getting myself into. And I just, you know, I didn't have kind of the time or the energy
really to do a lot of coding on the weekends or do a lot of coding after work. And it wasn't until I
found areas that I was kind of really passionate about for other reasons, you know, not just
tutorials or quizzes or whatever that I started spending a lot more time on it and kind of getting
really interested.
Right. The stuff you do in the financial place is not a super fun thing to take home and work on,
right?
Yeah.
So you got to find something else. Yeah, that's cool.
So I showed you, you know, this headdress, this LED kind of headdress that I built with,
you know, flowers and it's really beautiful. And I worked on that for hours, you know, just...
For this whole show, everyone, I'm going to basically have to be like the narrator since
a lot of this stuff has a visual component to it, right? Like it's, oh, you push this
button or we plug in this device and what does it look like? How big is it? So I guess I'll
start by describing the headdress. It's like a, I don't know, it's probably like a big circular
fan type headdress and it's probably fans out about a foot or so. And it's got all these LEDs
that are going and it's just, it's super cool. And so that you built with Arduino, right?
That's right. So that does not run Python. I use something called the FastLED library.
Yeah. And that was just about really just animating LEDs, right? And so there's kind of a,
it's actually a big thing and it's pretty omnipresent, right? It would definitely stand
out at a party, but it's not a huge programming thing, right? It's not like super interactive
in that sense, right?
It's not interactive, but there is a push button. So there's six or seven patterns that I programmed.
Okay. Yeah. So yeah, there's some interactivity to it. Okay. Awesome. All right. So you did that
and you're like, Hey, this is embedded stuff. This is pretty cool. Sort of designing
things with Python. And that's definitely got to be a lot easier these days, right? There's a lot more
stuff out there, a lot more little boards and devices you can get, right?
Yeah. This field is, you know, at least for Python is still very, very new. So all the software,
all the devices, you know, there's a lot of excitement in that space and things are
kind of moving pretty quickly.
For sure. So I guess maybe the, the headdress you described maybe falls under art. There's also
animations, but like actual graphical animations people could play around with. Have you seen
this, the programming music with Python, like the Fox dot stuff before?
No, I haven't.
Oh my gosh. yeah. Maybe I'll put a link to it. It's just, there's some really cool stuff people
are doing with like live performance music with Python. And so there's just all these really,
really great ways that are, you know, very far away from people's jobs.
Yeah.
That's you play with code instead of, you know, just take your work home with you,
which I think that's great.
There was a conference here in Portland over the weekend called Teardown Hardware Conference.
And Scott Shawcroft, who is the maintainer of CircuitPython, he did a demo of the Game Boy.
He kind of hacked a cartridge to run CircuitPython on an original Game Boy. And his demo was all
playing tones, right? So, you know, depending on what bit was set or wasn't set for a particular
register that would vary the length of the tone that was played or the pitch. And I just, the whole
time I was thinking like, I really want you to be a CircuitPython chip tunes, you know, DJ.
Yeah. Yeah. That's awesome. That sounds like so fun and tune it on the Game Boy. That's pretty
wild, right? That's not even intended for it. I feel like the Nintendo stuff is pretty locked down.
Cool. Cool. So, you know, I guess let's start this conversation with like, how do I write code
in Python and run code? So if I were to go to my Mac and type Python, I'd be running CPython.
But when I think of embedded programming, often people say, well, you have to use C to do this,
right? But there's a couple of options. Like you mentioned CircuitPython before that, or sort of
parallel and started like as a, started that project as well as MicroPython. And then there's probably
other options that I don't know about. Like maybe you could put Python on an Arduino or
who knows, something like that. Maybe talk us through the options and like why you would choose
one or another. Some of the kind of Arduino options, you can just run, you know, straight Python on there.
And it's just CPython that we all know and love? I believe so. Yeah. But the downside is,
you know, the devices are a little bit bigger. They're a little bit less lightweight.
Use more battery, probably. Use more battery. And they're kind of geared towards a more advanced
audience. Okay. MicroPython. I actually haven't done much work with MicroPython. I don't really
have any of the devices that run it. So I don't have a micro bit or anything like that. But that was the
original Python for kind of these, you know, devices and CircuitPython forked from it, maybe about three
years ago. And it differentiates itself by aiming to be the fork that's focused towards learning.
So it's not, you know, maybe the fastest or the most optimized, but it's the one that's going to be easiest
for beginners to pick up on and use. And that's important because it can be super frustrating with some of these
things. They're, they're, they're kind of glitchy. Like I'd only done mostly web development and server
side programming and stuff for a long time. And recently we did some mobile development for my
courses and man, I just felt like, wow, life is a whole lot harder for some people than others. And
I kind of get that sense, like watching you work through all your devices, like they're really cool.
And they, they do work with their, they all take like a special little setup or like, it's a little,
a little tricky to get started, right? Not hard, but like, you know, you got to find the right volume
and all this one's not connecting and just like that kind of stuff, right?
Yeah. You know, I mess with mine probably more than most, but the, yeah, the, the goal for these
CircuitPython devices is that you just, you plug it in and it shows up as a drive. And, if you're
not, you know, messing with it, like I am, or kind of plugging in a bunch at once, it does work
relatively well. There are a ton of guides on Adafruit for a lot of things that you might want to do.
And they're also really good about releasing helpful libraries.
Okay. Like little Python libraries you can use and stuff.
Yeah. Like, these LED strips are in Adafruit land. They're called NeoPixels, but they're just
WS2812, LEDs. So they have libraries for filling all the NeoPixels on a particular device. Like,
the, CircuitPlayground Express has, you know, the built-in ring. So a lot of kind of helper methods
for things like that.
That's really cool.
This portion of Talk Python to me is brought to you by Ting. Let me tell you about Ting, a new mobile
service available in the U.S. that's targeted developers and other technically savvy folks.
First of all, their average customer only pays $23 a month, but they're no discount provider.
Their service runs over T-Mobile's and Sprint's fast nationwide network.
If you don't use that much data because you're usually on Wi-Fi, like many of you are, then Ting will save you a ton of cash.
But don't worry, you can still use as much data as you like for just $10 per gig.
One mobile feature I use all the time is tethering. And with Ting, you get unlimited tethering at the
same data rate with your account. $6 a month for a phone line, $10 a gig, $3 a month for text if you
usually chat over iMessage or WhatsApp. Think about it, no contracts and super clear and fair billing.
Visit python.ting.com, that's python.ting.com, and check out their savings calculator.
Enter your usage and see exactly what you'd pay. Use that link and you'll get a $25 credit to try
them as well. That's python.ting.com or just click the link in the show notes.
Maybe that's a good place to talk a little bit about some of the devices we might start with.
We'll dig into the, you got a bunch here we're going to talk to you. They're going to be really
fun. But you know, everyone who attended PyCon got in CircuitPython Express. Is that what it's called?
CircuitPlayground Express.
Yeah. And maybe that gives people a good idea of just what's possible these days, because how would
you describe the size of that thing? It's like, I don't know, five centimeters across, two inches,
something like that, across probably.
About two inches.
Yeah. And, you know, maybe describe all the stuff that is on this little tiny,
super thin device here.
The cool thing about this, I was showing, Michael, I was showing you some of my other projects,
like something that I built at a teardown workshop and it involved a lot of soldering.
Yeah. Hot irons and maybe not connecting the right thing to the right. It's pretty intimidating,
actually, if you haven't done it before, I think.
Yeah, it definitely is. And not yesterday. I've gotten, I've gotten a lot better at it,
but definitely when I was, you know, first starting out, I've gotten, you know, like little burns here
and there. So you do have to be kind of really careful. You have to think about, you know, polarity of
things. Am I putting it in the right way? Am I using, am I using the right components? Even
breadboarding, you know, there's kind of some complication to it. So the thing that I like
about these Circuit Playground Express devices, it has kind of everything that you need to just get
started conceptually on one board. So it has both inputs and outputs, right? So inputs being things like
there's two programmable buttons on here. There's a switch that you can program. There are some sensors
on here, like there's an accelerometer, there's a temperature sensor, a few other things. And then
the outputs are the, the ring of LEDs around it.
And you probably can connect other stuff. Like, could you connect a speaker or something to it?
So there is a tiny speaker on it.
That's awesome.
And then you can use the, there's kind of these inputs and outputs along the sides as well that
you can connect to, you know, you can hack up a NeoPixel strip or something pretty easily with just
alligator clips.
Yeah. So it's like a circle and there's maybe 10, 12 little punched out rings on the outside and you
can connect stuff and control like lights and stuff with that. Right.
There's some inputs in here, both analog and digital.
That's super cool. And that whole thing costs like what? $25. It's not super expensive, right?
Yeah. I think these are $25, $35.
Yeah. So if you want to get started, this is probably a good one because it has a bunch of
built-in sensors, you don't have to like try to attach them and so on. That's a pretty good option.
Another one that looked interesting, you know, is not really in the realm of what you've been
working on, but maybe other people would be interested in is there's a Pi Gamer, right?
So if you're interested in like doing little games with like Pi Game, that's another good
option. And it's more, but it's like $20 more. It's not like, it's like 49. There's a starter
kit for $59. Like these things are all really approachable for folks. Right. And I feel like
these types of devices would be really good for kids or people who are getting into programming
who are, don't fit the, I don't know, the traditional, just plow through the technical
bits until like you get there. I feel like so much of traditional programming is taught
with like extreme delayed gratification, right? Like, okay, you're going to take a course on
programming and this semester you won't really do anything interesting at all. So you're
going to work really hard all semester and come up with nothing. Maybe the end of next
course after this, you'll have something that's cool. And like, really, that's how it goes,
right? Like, here's how you do a loop. Here's what a variable is. Here's how the memory works.
Here's a heap and all that. Like you've got to plow through that in order to get to something
like where it actually is creative and fun on the other side. Whereas like this kind of stuff,
right? 10 lines of Python, plug in a USB to your computer and you've got cool stuff happening
already, right? So I feel like it's a much more approachable, like early win, get into program.
Then once you're really into it, you're like, okay, well, how do I do this looping? Because I want to
make it cycle or whatever. I think it's, it's a much more natural way to approach learning programming.
I think so as well. Yeah. I, all the code examples that I used in my keynote, I try to make them be,
you know, each one just kind of building on the next. There's just something, you know,
magical about holding something in your hand and having it do something right. That just,
like you said, that kind of immediate reward, immediate gratification. And I think whatever
we can do in our industry to get, you know, not just kids, but even just, this is fun for adults,
right? Yeah. Yeah. Yeah. It's, it's super cool. Just get more people interested. There's tons of
little projects that you could do with this. I mean, if you're into gardening and you could do IoT,
like plant monitoring, all kinds of stuff, right? Like it's, it's pretty neat. I love it.
I'm still a hobbyist. Yeah. I like that. You don't have to be an expert to use a device like this and
kind of get the basics down and get the concepts down. You know, I'm not an electrical engineer and I
never will be, but I can still do a lot with something like this. Right. Right. You're not mapping out the
actual circuit or whatever. Right. But yeah, that's really cool. And it seems like some
super fun projects that we'll talk about. But before we get into the actual steps of programming,
let's just maybe talk real quickly about the BBC micro bit, because you quoted some cool stats
from there at the end of your keynote. I've had a topic on it before on the show. And, you know,
it's a really cool story where the BBC funded giving a little device, kind of like what we're talking
about to what grade was it in all the UK? I don't remember.
Like late elementary school, early middle school, something like fifth, sixth, seventh grade,
something like this, right? Yeah. Like 11, 12 year olds.
Yes, exactly. Okay. So yeah, there's some really cool stats. If you want to tell us about that.
Something I really like about this project that they did is they did kind of an exit survey,
right? So they surveyed kids kind of before and after. And some of the numbers that came out of this
were 90% of the kids after they got to use the micro bit thought that coding was for everyone.
Right. Because a lot of people feel like coding for either super geeky people or super smart people,
or maybe the intersection of those. I don't know. Like it's, it doesn't feel like, oh yeah,
everyone can just do this. Right. It feels very like you got to know the magic and there's,
it's just too hard to get into a lot of times. I feel maybe that's a little bit less these days.
I mean, when it was like C++ and assembly, it really felt, or Java even, it felt like,
you know, this is not something you just walk up to and get a job in, or you become proficient in.
Even kind of when I first got the hardware stuff on my radar, you know, a lot of the projects that
are coming out, I just, I wasn't really kind of particularly interested in them. Right.
Yeah.
It wasn't until I started seeing, you know, projects and builds and guides and tutorials
that were doing things that matched my interest more, matched my aesthetic that I recognized,
you know, that it was something that I could try as well.
Yeah. It's awesome. Like build something you could wear or like make something awesome for Halloween.
Right. Something like that. That sounds really fun. Yeah. So another stat, 86% of the kids who went
through it said computer science is a topic that's more interesting to them afterwards.
Yeah. Yeah. I think so as well. Right. You know, like you said, kind of mixing those things in
little by little, right. You know, looping control statements, if else, and then seeing it happen.
Yeah, absolutely. The visual aspect. And then I think also just the learning just enough. Right. And so I
guess we didn't mention this at the top, but it's worth pointing out that the micro bit ran
micro Python at the time. Actually, they started out in the historically trying to do some other
way to program it. I don't know if it was like in C or it was in, they're trying to build their own
little operating system for it or something, but it wasn't Python and micro Python until it got a
little ways down the road. They're like, this looks hard. You should use micro Python. And they went for
it. So that's really good. Yeah. Yeah. And then the last one you said was very near and dear to your
heart. Yeah. 70% of girls said that they would choose computer science as a subject option after using the
micro bit. That is super cool. I think it really, really speaks to like the first one, like a lot
of people find it more interesting or they thought it was for everyone. And of course, girls would feel
that way as well. Right. Like it's, it's a fun thing to work on. And like a lot of these projects we're
going to talk about are, you know, super interesting for girls and boys. Right. But definitely, definitely
interesting. So let's talk a little bit about the overall flow of like, what does it look like to
program? One of these things, right? Like maybe I go and order the circuit Python express,
uh, circuit playground, sorry. And, and I get that. And then, well, now I have this thing and it's cool,
but what do I do? Right. Like, how do I get started? What are the steps? These are Arduino compatible.
So there is a mode that you can go into where you can just write straight Arduino for this as well.
Okay. So it's not limited to just circuit Python. So depending on when and where you bought your
circuit playground express, it might either already have circuit Python loaded up on it,
which is great. You'll plug it in and you'll see a circuit Python drive. If you don't, it's pretty easy.
All you need to do is check out the Adafruit website and there's instructions for putting
this into boot letter mode and you basically just drag and drop a file and then circuit Python's
available. Okay. Yeah. And if you pick yours up at PyCon, circuit Python's already on there. So
easy peasy. Yeah. Super easy.
Once it's available as a drive, you will see either a main.py file or a code.py file. I believe code.py is
the standard that they're moving towards. The really nice thing about these devices and circuit Python
in general is with Arduino, you would have to write your code and then there's a compile step and there's
a step where you'd have to load it onto your device. And sometimes it wouldn't transfer correctly or it
wouldn't be recognized. And so there's just kind of a lot of waiting and fiddling in the process.
With circuit Python, all you need to do is if the code.py file is not there, you just, you make it,
you type your code in, you save it, and then it auto reloads on the device.
Yeah. That's cool. So basically the programming effect is I just edit this file and then when you
hit save, it reruns it. Either it's good and it runs or it's going to crash or whatever. And
we'll talk about debugging them in a little bit, but yeah, you just, it basically just auto refreshes.
I mean, kind of like Flask or something you're doing web development, you make a change, it detects it
and it just goes, but it's just on the device, right? So you don't have to like turn it on or start
Python. You don't have to do any REPL thing. You just, you edit a file like by virtue of powering it,
it's trying to run that file. And then it just watches for changes, I'd guess, something like that.
The important thing here though, is you do want to use a known good micro USB cable that has both
data and charge. A lot of cables don't. And so point of frustration for a lot of folks is they're
using a cable that's just for charging. The drive isn't being recognized.
Like that $3 one you got at Target or something, right? It's $3 because it probably doesn't carry
the data or whatever.
Right.
Yeah. Okay. Yeah. So you got to be real careful about that. But other than that,
like you basically plug in a micro USB thing, then regular USB to your computer and then it's up,
you have to find, find it as a volume or a drive, right? So you got to go and hunt that down.
So on Mac, if you have your finder open, you know, it'll just show up there on the left-hand side.
Yeah. And that's easy. And it's probably similar to Windows Explorer. It probably just shows up as
another like attached drive or something.
I believe so. I actually don't use a Windows computer. It's ironic, right?
Yeah. Don't you work for Microsoft?
I do. Yeah.
You work on this code PY file. I guess maybe it's pretty much straightforward. You import some of
the libraries that maybe CircuitPython provides so that you can program things or maybe something
from Adafruit. So like the regular standard library doesn't probably have something for talking to
LEDs.
Right.
Right. But this probably has a bunch of stuff like that you're going to work with.
Some of the libraries are kind of baked in. So on the Circuit Playground Express, there's
Circuit Playground Express library that makes it really easy to work with the buttons, for example,
and some of those sensors on the device, you know, the switches and all of that. So for that,
you just have to import it. Some of the external libraries, like the ones for working with, you know,
additional NeoPixel strips or some of the things that you can, you know, kind of extend and plug into
this need to live in a library folder.
Okay.
And you can just find those dependencies on CircuitPython.org.
I see. So if I want to have some sort of external dependency, that's possible?
Yeah.
Do I pip install it? Do I download it and copy over? Like what's the,
what's the mechanism? Like I just copy into this libraries folder?
Yeah. You just copy it into the libraries folder. There's definitely some additional work that can be
thought of with packaging. You know, there's no good way of pegging a dependency to a version,
for example, but the project is open source. And they will gladly.
Exactly. PRs are accepted.
Yeah. They'll gladly accept your contributions in the space.
Yeah. I can imagine that they would. Like you said, it's early days, right?
Yeah.
So it's, it's wide open. I feel like it's really growing quite a bit. A lot of interest
is developing here and a lot of, a lot of different angles, like the education space,
people are makers, all kinds of stuff.
I think the key here is, you know, it's not just for kids. People look at some of these devices and
they're like, Oh, this will be fun for my eight year old, you know, but it'll be really fun for you
too.
For sure. You can definitely do some, some cool things. You know, one of the things that I find is actually
a challenge, maybe because I'm good at programming. I don't perceive that as a challenge,
but just my assessment of like looking at this space, like what is challenging. The programming
is a little challenging, but I feel like knowing what extra things go with my device. Like what if
I want, you know, like strips along the wall that light up when it watches me walk by, or, you know,
it just says, you know, to text me and like, well, Greece welcomes me when I'm home or welcome to our
house or whatever it says. Right. Like if I wanted to do something like that, like I just look at all
the stuff I could go shopping for at crowdsource or, on adafruit.com or, and I'm just like,
there's a bunch of stuff here. I'm not sure it's even compatible with this thing I want to get.
Like, how do you address those kinds of things?
So I've gotten, kind of a lot better about figuring out what parts or components I might
need and how, how things work together. But until that happened, I would just look at guides online
that had incorporated some aspect of what I wanted to do. And then I would just kind of deconstruct
that and kind of pick and choose and figure out ways to put those things together. So there's guides
on Adafruit. There are guides on Instructables. I just met a really cool maker who does a lot of
wearable stuff for an Arduino based magazine, Sophie Wong. Okay. Yeah. She, she makes really cool.
She had this led jacket. She does kind of cosplay. So she brought this helmet, like led helmet that
she made for astronaut costume. That was just amazing and incredible.
Oh, wow. Yeah. Yeah. I can imagine the cosplay stuff. It's really got a lot of,
a lot of cool options actually. You should check out her guides. cause her led jacket was powered
by one of these circuit playground expresses. I rode over here on my motorcycle, right? And I just saw
yesterday on YouTube, this guy who had built a helmet like from Tron and had these led lights all
over it. It had this like, sort of one of these type of chips and batteries on the back.
And you could do some like super cool stuff with that as well. Like have that light up way right
at night or yeah, it's not really, there's just a lot of cool little projects you could just take on.
Right. My only piece of advice in that space is you want to build things incrementally. So you might
have, you know, this kind of crazy idea of, you know, yeah, this grand vision, but it's, you'll have a
much easier time and you'll end up on a happier path. If you start with something much smaller scale and
either really understand how all the components work first written and how they work together
before you take on a really large undertaking. Yeah. Yeah. Even on small things, right? Like
write one line of code, see it run, write another line of code, see it run, because there's not a
whole lot of debugging or like high end tools to attach it to analyze it. Right. It's kind of like
print statements. And, you know, we should also talk about that. you know, if, if I like try to figure
out what's going on, I do a print statement or something like that, I'll probably be a little
disappointed on the output at first. Right. If I don't, don't like find a way to connect to it.
All the code is running on this little device and you won't see any output. Right. It has no screen.
And it's, as far as it's concerned, it's its own operating system. It doesn't care about your Mac or
your windows or whatever you connected it to or any, cause it might not be connected to anything.
Right. If you want to see any debugging output on this, you can either use something like the
mute editor. So that's an editor that's good, not just for beginners, but for folks who are just
starting out with hardware. Cause there's just kind of buttons for all these things. There's one button
that says open serial console and that's where you would go to see your print output. Right. So it just
listens for the serial output and it just prints out whatever it sees. Right. Which is, so these
things, when you connect them, they basically appear to your computer, like modems. Is that right?
As a drive.
As a drive. Okay. Yeah. So you connect to them and you get the output and whatnot.
That's cool. I guess another, you know, so we talked about the circuit playground express,
another one that's a pretty good one and that's self-contained, right? So knowing what I need to
get for that, I can do a lot of interesting stuff. Just that one little thing in a power core,
power data cord. There's also a pie gamer, which is kind of cool. A little screen, a couple of buttons
and a controller.
There's a pie badge. I have one right here.
The pie badge is super cool. It's got some buttons and a screen, like two sets of buttons,
like an AB button and then like the four arrows and a little, a little screen on it. That's,
those are both really cool. And then, I don't know about this one. You probably can tell us,
but the pie gamer comes with a starter kit as well with a battery and a speaker and a little box it
goes into. So, you know, for me, I'm, I'm kind of, I'm at the super early stages of this stuff. So I'm
like, all right, starter kit. Does it say starter kit? That's good for me. I'm going to try that
maybe and then see what else I got to get. I believe the pie gamer is going to be in the
ADA box that's shipping right now. Okay. Yeah. So if you're subscribed, you should get a fun surprise
in the mail. Oh, how cool. How cool. Yeah. It's some of these things are hard to get ahold of. They
keep selling out. Yeah. So I guess that's a good sign. Yeah. The, this thing, the pie portal,
it's been a pretty hot seller. Yeah. So let me describe the pie portal. So the pie portal is this,
let's say three inch by two inch touchscreen. And it looks basically just like a touchscreen from the
front. There's almost no other circuitry you can see. And I guess translation, what is that like five
by seven centimeters? And yeah, it's just a little touchscreen that you can program with CircuitPython,
right? The cool thing about this one, it also has internet connectivity. Yeah. The internet connectivity
is missing from the Playground Express, right? Yes. And that would be so, it's like the one thing,
like a little wifi something. Can you get an adapter to plug into it that works? I don't know. I haven't
thought that one through. I haven't tried it either. So I guess you got to decide what am I trying to
build? Does it need internet connectivity? Right. Right. Right. Do you want to do something IOT
related? Right. Right. If it's IOT, then it probably needs that. This portion of Talk Python to Me is
brought to you by Rollbar. Got a question for you. Have you been outsourcing your bug discovery to your
users? Have you been making them send you bug reports? You know, there's two problems with that.
You can't discover all the bugs this way. And some users don't bother reporting bugs at all.
They just leave, sometimes forever. The best software teams practice proactive error monitoring.
They detect all the errors in their production apps and services in real time and debug important errors
in minutes or hours, sometimes before users even notice. Teams from companies like Twilio,
Instacart, and CircleCI use Rollbar to do this. With Rollbar, you get a real-time feed of all the errors,
so you know exactly what's broken in production. And Rollbar automatically collects all the relevant
data and metadata you need to debug the errors so you don't have to sift through logs. If you aren't
using Rollbar yet, they have a special offer for you, and it's really awesome. Sign up and install
Rollbar at talkpython.fm/Rollbar, and Rollbar will send you a $100 gift card to use at the Open
Collective, where you can donate to any of the 900 plus projects listed under the Open Source Collective
or to the Women Who Code organization. Get notified of errors in real time and make a difference in open
source. Visit talkpython.fm/Rollbar today.
I really like the screens here. I mean, the LEDs are cool and they're fun, but you have a lot of
flexibility of doing fun stuff. So one of the projects you were showing me earlier before we
started talking on the recording is the Python 2 death clock. So I talked about, you know, legacy Python
and how we're finally moving past, right? Past Python 2, I think. But a while ago, someone made something,
I think it's pythonclock.org or something like this, where it's just the countdown until the end of Python 2.
Yeah.
Right? And so you've got this cool little app that you built on one of these. Yeah. And it's,
man, it is beautiful. Yeah. You want to just tell us about it?
Yeah. So I wanted to make my own desktop Python 2.7 countdown, you know, so I could just keep an eye
on it. Yeah. Didn't have to have a browser tab open. Come in the morning, sit down. You're like,
oh yeah, it's 190 days now. Yeah. 190 days, four hours, 31 minutes. Right on. The fun thing about
this is I really wanted to kind of use the touchscreen capability here. And so I wanted my Python 2.7
countdown timer to match my mood. Okay. Right. So there's a kind of a bunch of different themes that
you can flip through with the left and right side of the touchscreen, you know, light colored
background, dark colored background, there's different fonts. So, you know, whatever mood
you're kind of feeling like that day, more modern, more abstract. That's the version of the Python
2.7 countdown.
Yeah. That's super cool. So you just touch the screen and it cycles through and it's just constantly
counting down the time there. Yeah. So tell us about programming that.
So this is interesting. This is kind of where I bumped into some of the limitations and the quirks
of a device like this. So there's no real time clock on this. Right. Okay. So you have to go and
fetch the time from the internet. Because it just doesn't, it's just, it's like Grandhog day for it.
It doesn't know what time it is. Once you kind of unplug it, you know, unplug it back and it doesn't
know what time it is. And it can kind of keep track of the time for a little bit, but then eventually
the clock will start to drift. So you want to fetch the time from the internet. Yeah, just refresh it.
Okay. Every once in a while. It has Wi-Fi. So it's, it's a big deal. Yeah. The other thing I haven't really
kind of figured out how to do in the longer term, this works just fine on a home network.
You provide your SSID and password and just a secret stop UI file, but it doesn't really work
well with captive portals, you know? So if you're at a conference or something and there's a lot of
sign-in steps, having quite kind of thought that through soon, you do kind of have to, you know,
tether your phone or something else. But yeah, all the graphics are kind of lower level. So
the backgrounds that you see there, they're all, I believe, 16-bit bitmaps.
Yeah. And you have a video of this that people can look at. So we'll put that in the share notes
that people can check it out and watch it going and see what it's like. So that'd be cool.
I'll try to share the repo and then a blog post of kind of explaining all of the, all of the code
ready by the time.
Yeah, sure. That would be great. So there's some interesting challenges to programming this,
right? It's not just like, you know, playing with the terminal or even with like PyGamer or Kivy,
where you program in some high-end graphics thing like OpenGL or something like that. Like,
there's not like a graphics card in the traditional sense, right? Like, so even getting text on the
screen is a little, it requires not hacks, but it requires like funky techniques, right?
Yeah. You have to port whatever font you want to use into a bitmap font. Yeah. So just kind of a lot
of downscaling. I don't remember how much room is on this, but it's enough to kind of get you going
for most basic projects, but you can't, you know, drop a uncompressed video on here or something like
that. You know, you'll run out of room. Sure, sure. And you have to do interesting optimizations
potentially. Like if you're going to animate the, say the numbers, right? Maybe you have to like pre
pre-allocate all the font representations for 0, 1, 2, 3 and things like this, right?
Yeah. You can kind of optimize by saying, you know, which characters are you going to be using
in the course of your program? Load those from the font. Yeah. So you have to think about some things
when you work on these super small devices that maybe we might just overlook, right?
That's pretty cool. But yeah, it's, it looks great and we'll put the video of it up. It's,
it's going to be fun. So maybe we could, you have a whole bunch of hardware, big, small screens,
no screens, lights, no lights hanging around here. Maybe we could just talk through some of
these devices and some of the cool little projects or things you might be doing with them.
Yeah. I can kind of start from smallest and work my way up. So this here is a Trinket M0.
Yeah. So this is maybe a quarter inch by one inch, something like that. So two centimeters by like
one, maybe. Teeny tiny. Yeah. Very tiny. Kind of, you know, about the size of a, of a U.S. quarter
and pretty basic as well. And, you know, to be fair, I do have a lot of Adafruit devices here.
I'm a fan. Yeah. But there are other devices out there that do run Python or, you know,
MicroPython or even CircuitPython. But I will kind of talk through what I have in front of me and,
you know, what I use for my projects. So this is kind of nice because it does have a micro USB
for programming. Yeah. It's really nice that it just plugs into like, Hey, I have a Kindle,
so I'm just going to grab that or whatever. I just use that cord or I have a certain type of
Android phone. Maybe it just takes that. So there's just like a, you know, a handful of small
or a handful of inputs and outputs here and then, you know, mounting holes. So if you're really kind
of tight for space, this is a good option. That's super small. Yeah. It doesn't have a port,
you know, that JST port for something like a light poly battery or, you know, different kind of battery
closures like the CircuitPlayground Express has, right? And that kind of plugs in there.
So this is a micro USB only. And then this right here is the Gemma.
Okay. The Gemma is really like a quarter or something like that or so. Yeah.
This is what was included in the PyCon swag bags last year.
Right. The 2018 one.
So this was like the dip your toe in the water of the IoT before the CircuitPlayground one.
Or programming hardware because this also doesn't have any internet connectivity on it.
Okay.
The nice thing about this form factor is it's great for
Sobel electronics and wearables, right? Okay.
So it's got these big pads on the sides that you can use to
run conductive thread through or conductive paint, right?
This thing is super tiny. It's like really about the size of a quarter. It may be thinner
than a quarter except for it's got his little power thing bumping up there.
Right.
You could probably make some really cool Halloween costumes or something for, you know, like a parade.
Yeah.
Or if you're giving a talk, right? Like you've been known to have some pretty cool devices that like
you've like secretly worn into the conference talks when you're giving them, right?
I used Gemma MZero's for my Python powered earring.
Yeah. That's awesome.
That I'm holding right here. I will turn them on. They're bright because,
you know, they're meant for being worn on like a conference stage so that folks can see me in the back.
For sure.
But these are really, really fun.
So they're like big ring. It's a big ring of LEDs that are animated. And then like an inner little
light thing as well. And then this little tiny circular board that we just talked about is back
there with a battery stuck to it. Yeah.
Doing all the magic to make it actually happen, right?
I did have to do quite a bit of soldering, you know, to get everything to work here. There's
three layers of LED rings. So the kind of these, you know, individual neopixel rings.
And you'll see that each one of these has pads on the back here, a data in, data out,
a ground and a power.
And did you have to solder these?
Yes.
Okay.
You can see they're kind of small and unwieldy. So, you know, it was a fun little project,
but something a little bit more complicated than, you know, a Circuit Playground Express,
for example.
It requires actual hardware aspects of like building hardware a little bit, right? Like you've got to
connect stuff and whatnot rather than just like pure programming to the thing.
Just some soldering skills. This project was based on a guide by a really cool maker. Her
name is Becky Stern.
Okay.
And so her, her original idea was, you know, having this Gemma with kind of one LED ring. And I wanted
to have more LEDs, you know, cause always just, I just always want to have more LEDs. So I added
more in there and then wrote my own custom Python code.
Yeah. That's really cool. You know, another one that you were showing me that I thought is pretty
cool was with the Pi badge. So with the Pi badge, I have to describe a little bit. It's,
it's got a little screen. The screen is maybe one and a half by one inches, maybe a tiny bit larger
than that. And it's meant, it does have buttons and stuff, but it's meant to be worn as an actual
badge at a conference, right?
Yeah.
Like instead of like just the printed one or whatever.
Yeah. It's what I'm wearing in my Twitter profile picture.
Okay. Really cool. And so you've, you obviously have the screen to put like your name.
Hello, my name is Michael or Nina, whatever you want to put there, but you could also do other
stuff. And you know, at PyCon, we have this like certain color of badge means I'm willing to be
in photos or I'm not willing to be in photos. There's a couple of other things you can get like
sticker, like stickers, little like, cloth ribbons that go under and that indicate a few
things. But you had this really cool idea of, of taking a Neo pixel lanyard, the actual like
rope thing that this hangs on and lighting that up based on how you're feeling now or how you want
interactions right now, rather than blanket. I don't want pictures or blanket. I want to talk
to people or I don't, but you know, like right now I'm busy, please don't talk to me or our,
Hey, I'd love to talk to you. Come on over. Right. So tell people about this project. This is cool.
So the nice thing about this pie badge, it does have, you know, kind of mounting holes,
but then you can also use them for just a clip. Right. Right. So you can easily wear it around
your neck. And my coworker, Tommy, I hope I pronounce his last name right. Tommy Falgao. He
did this really cool build of a Lego badge holder with kind of this Arduino based LED badge lanyard.
It just looks awesome. I'll send you a link on Twitter for you to share with your listeners.
And I saw it and, he kind of did some IOT stuff and he wants to make it internet connected,
but you know, the pie badge is not internet connected. And so I thought, you know, how can I
make this fun and useful just as a wearable? And I think I would label myself as an expovert,
you know, at conferences. Yeah. Describe that to us. I think a lot of people who know me casually
would find it hard to believe that I'm very introverted. And so I do like meeting people.
I love talking to people, but at some point I need to kind of just, you know, run away and recharge and
have, have quiet time. Or I, I slowly kind of get crankier and crankier. You know, I've seen you at
conferences and it's like, there's always a crowd of people talking to you. So it's wonderful, but it also
is draining, right? Like, I mean, when I go to PyCon by the third day, I literally have lost my voice
because while I love talking to people, I just, at some point, like my body breaks down and just says,
no, you're not taking any more of this, right? It's so cool. I love that people want to come
and chat with me and I never want to be rude or turn someone away. So there's always this conflict of,
you know, I need to do some self-care, right? Right. Or just, I got to be ready for a meeting
or presentation in 15 minutes, right? Like I was at the booth at PyCon getting ready to do a live
presentation. So I was sitting, sitting kind of next to this little, pop-up stage in the expo
area. And I was like, literally trying to get the demos ready. And someone's like, Oh, Michael, I'd love
to meet you. Hey, I was going like, Hey, it's really great to meet you, but I really need like five
minutes because we're, I think we were doing a live Python bytes recording. I'm like, I really have to
figure out what we're talking about in five minutes. Right. So it was just times like that at
conferences where it's like, you know, just, you would love to be able to like signal that.
Yeah. Yeah. So I'm going to use the pie badge for that and a, an led strip. And there are,
I don't want to say proprietary, they're not proprietary, but there are some kind of data
out ports on here. They use a three pin 20 millimeter JST clip. So you just kind of have to
find and buy the right one. Right. It's not like you just plug in micro USB or something, right?
I have a few here. I, I saw Scott Shawcraft, the circuit Python maintainer. He, you know,
works with Adafruit. I saw him in Seattle early last week and I was like, please bring me some of this,
you know, odd looking adapter. So it kind of looks like the, you know, these, we'll talk about powering
your projects a little bit later. It kind of looks like these LiPoly, you know, JST connectors.
There's just one more pin. Right. These little white three pin connectors. Yeah. Uh-huh.
So the battery just has two, you know, red and black, ground and power. This has three,
cause there is a ground and power and also data. Okay. So you can just plug one of these right into
the Pi badge. And then I'm going to do a little bit of light soldering and just solder my led strip to
the end of this, which, which means, you know, I can easily disconnect it. There's not a lot of
wiring or anything like that. And that's just going to run through a lanyard clip. Yeah. And then this
connects to the NeoPixels. Yeah. That's going to connect to the NeoPixels. And so I'm going to be able
to kind of adjust and say, you know, instead of, do I want my photo taken or not? It's like,
well, maybe if my badge lanyard is red, I can also, you know, update the message on the Pi badge here
saying like, now's really not a good time to talk. You know, maybe yellow is like only if you really
need to. And then if my lanyard green come up and chat, I'm happy to. Right. Or it's rainbow colors
and blinking or just something obvious. And I think that's, yeah, that's super cool. So the
lanyard basically is like a ring or like a strip of like super bright LEDs. Right. So like not just the
little badge will light up, like your whole lanyard will like actually have colors and communication.
That's cool. I'm so grateful for to Tommy for this idea. And he's actually going to be productizing
his version of the LED lanyard badges so that you'll be able to just go and buy a kit from him.
Yeah. Cool.
Yeah. I think so as well. I'll probably be documenting my build on this and trying to,
I'm so bad about, you know, I like getting in the zone and building these things. And I'm really bad
about stopping to take pictures and then document. Right. Right. Because along the way,
you almost got to rebuild it a second time. Yeah. And just document it the second time through.
But I will share a link with his tweet and his product. I think it's going to make conferences a
lot more fun. But these are just the same kind of individually addressable LEDs that are on the
surface of the Circuit Playground Express. They're just kind of in a strip form.
Yeah. Yeah. This looks super cool.
And this project is going to involve a little bit of sewing so that I can get my badge clip on there.
I love it. I would love to see it. I mean, it's going to be a little bit tricky
just in terms of like getting conferences to offer it as, because it'll cost some money, right?
Yeah.
It won't be as cheap as just the paper, but if they could do it, it would be so cool, right?
Yeah. I would love to see that at some point in the future.
I mean, they did give them out in the swag bags, the Playground Circuit Expresses.
Yeah.
Circuit Playground Express. It could just be, well, it's not in your bag. It is your lanyard.
Yeah.
Right. And it has a little screen. So it's not really that big of a stretch, I guess,
on that regard.
No. The current iteration, you know, it is a little fragile. So you have to treat it carefully.
Right. Or, you know, these strips, especially ones that don't have any casing on them, they're pretty
bendy here. And so if you break, you'll see in between each strip, there's, you know, the powered
data on the ground. So if this breaks or disconnects, then you lose, you know, you lose connectivity
to the rest of the strip.
It's like Christmas lights.
Yeah.
Kind of.
It's also, you know, I haven't, I've been thinking through some ways of wearing it,
but I haven't figured out a way to make the length adjustable, you know, without damaging
the components inside. So.
So there are some challenges and maybe, and maybe it's not all strip, right? Maybe there's
just like two parts that light up or something. And then there's like just a gap. I'm sure
you'll figure it out.
Yeah, that could work. That's always kind of the fun thing about, you know, the prototype
or the first build is like, how do all the pieces fit together? You know, despite your
best intentions, things don't always fit or look or work the way that you expect them to
or would like them to.
It's a really cool idea. And it's, it's one of these sort of practical things and it definitely
fits in with the style of stuff that you're doing. So I think it'd be cool. So I guess,
you know, we have the bag stuffing volunteers at the conference. Now there'll be the lanyard
building and programming thing that's the day before, right?
I bet those volunteers are not too thrilled by that idea.
No, that's gotta be a lot of work, right?
Mm-hmm. Yeah.
Cool. All right. Well, you got a few other things. You want to just quickly maybe tell
us about those?
So we talked about the Circuit Playground Express. I think the only thing I haven't shown you
so far is this.
So this one you got from this recent conference, you were just at the teardown.
I built this at a soldering workshop. And so this is a custom board. It's designed by Thomas
Hudson. He's local to Portland. He works for OMSI. So he does kind of a lot of electrical
work for them.
OMSI is a really cool like industrial and science museum here in town.
I'll share a link to his GitHub here. It's actually on the back of the board.
Oh, how cool. The GitHub is on the board. I love it. Yeah, yeah, yeah. That's really cool.
And this comes from, it has a crowd supply on it. And I don't know much about crowd supply,
although I've just recently seen a few things here. And it seems like there's a ton of this
kind of stuff available. What is that place? Do you know?
It's kind of like a Kickstarter, but for hardware projects.
Yeah, Kickstarter is specifically focused on these types of things. There's some really
cool stuff there. Okay. So.
I believe crowd supply sponsored this workshop, which is what allowed us to walk away with these
boards.
Sure.
So we just kind of started out with the boards here and then all of the components, you
know, I hand soldered on in this workshop, which was pretty fun. But this is based on the
NRF 52840 reference board.
So this is something that Thomas designed and it has Bluetooth connectivity on here.
A couple of LEDs, a couple of buttons.
A few buttons. And he put a bunch of kind of examples on online on his GitHub as well. So
this is going to be kind of an interesting reference board. And, you know, it shows you that if you
have the skills and the knowledge, you can build your own devices that run CircuitPython.
That's really cool. So there's probably a whole ecosystem instead of tooling around actually
designing the boards. Like if you want to have a board created, right?
This is not in my realm yet. It is something I'd like to learn this year.
It's super cool. It may never be in my realm, but I admire it. I share it's really cool.
One thing I do want to come back to before we run out of time though, is we talked about the
serial stuff with print, the mu editor, but there was another tip that you gave about actually getting
a REPL for the Python running on, on these embedded devices. So, I tell people real quick about that.
I think mu is a great project. I personally don't use it. I tend to write all my code in VS Code. I
really like the Python extension day to day. So I'll just have a side by side terminal open there. I'll
use screen to connect to the serial console.
And then you can get the print statements there instead of using mu.
You can see the print statements there. And then if you press, I don't remember if it's control C or
control D, there's a nice kind of helpful hint when you start your REPL. If you hit one of those
keyboard combinations in your serial console, you'll just get kicked into a REPL that's running on this
device.
Yeah, that's really cool. So you kind of cancel out of it and it just drops you into the REPL a little bit.
Yeah.
And you can kind of run stuff to stuff out. The nice thing about the PI portal or the PI badge that has
the screen on there is your REPL will be displayed on the screen.
That's super cool. I love it.
I can show you a little demo of that. But Scott, who I've mentioned a few times, he has one of those
IBM. I don't remember the model, but you know, those like really clacky old school IBM keyboards.
Yeah, the mechanical ones. Yeah, they're probably beige.
It's very, it's the beigest. So he has one of these PI portals just stuck onto a keyboard and you can
like type in the REPL on this really old school IBM keyboard.
Wow, that's crazy. It probably just has serial input or something straight into it, whatever the
keyboard does.
He brought that whole contraption to PI Cascades.
Okay. Yeah. How cool. That's awesome. And you also had some advice on how to exit out of screen.
There's a funny joke. I feel like some of these things are a little tricky. Like,
so if you want to generate a random string, obviously there's ways to do Python. But another
way is to put a first year computer science student in front of them and ask them to quit,
save and exit. Right. I feel like screens a little bit like that. Like there's a series of combinations.
You got to hit just right and it'll like let you out of it and stuff like that.
The important thing about screen is you have to press control A, which is kind of the leader key. And
then to quit, you press K. K for kill.
Cool. So let's touch on a couple other things really quick. So we talked all about CircuitPython
and programming in Python and people like Python, but maybe they're using this in an educational context or with younger kids or just people who are not programmers yet. So there's also a thing called Microsoft MakeCode. That's pretty cool. You want to tell people about that?
The nice thing about MakeCode is there's just this online based emulator. So you don't even have to have access to a device.
Actually, that's maybe the coolest part of it, right? Is that, yeah, it comes with a Circuit Playground Express emulator. So you can play around a little bit and decide if is this for me? Is this interesting? Then you get the, then you order the $25 little thing.
It's a kind of a block based editor, you know, like a scratch like editor. So really good for kids, really good for conceptualizing. They've done a lot of really interesting partnerships with Cartoon Network, for example. So there's a lot of, you know, Steven Universe is a really cute cartoon, not just for kids. Personally, I love it. I watch the whole series. And so there's a lot of Steven Universe projects that you can build on MakeCode. And then the code that you generate, it's portable. So if you do have a device, you can run it on there. If you don't, you can run it in the emulator.
You can also export it as JavaScript. Okay. And in the future, JavaScript, huh? Maybe even Python. Maybe. That'd be awesome. Okay. No commitment there, but maybe. That'd be awesome. Yeah. I do think it's really awesome that it comes with an emulator. Can you get like CircuitPython running on the emulator? Do you know? Like if you don't have a device and all the stuff we talked about, could you make that happen on the emulator that comes with MakeCode? I don't believe so. Okay.
Maybe someday. But yeah, if it outputs Python, that's kind of good enough. Eventually, if it ever does, right?
There is a group of interns working in Vancouver for the Microsoft Garage program that are doing some really interesting things with CircuitPython and VS Code.
That sounds really fun. What is Microsoft Garage?
It's kind of like a hack space, right?
Right. Like a maker space type of thing.
Maker space, yeah.
Okay.
So they have access to, you know, electronics and devices and, you know, kind of the stuff that you would find in a typical maker space.
And they're particularly focusing on the Circuit Playground Express. So I'm really interested in seeing their project.
Oh, that's super cool. Super cool.
So I get the sense from sitting here with you with all these cool things like, oh, I got one of these and I tried this here and I got this cable and, oh, have you seen this LED strip? How much fun this is.
But also how it would be much better to have that experience with other people who have these things. If you want to get into it, it probably makes a lot of sense to go to like meetups or maker spaces or other things like that where people are doing these kinds of things.
What advice do you have for people to like find other people doing this?
Yeah. So meetup is a great resource. If I lived in Seattle, I'd be going to Hardware Happy Hour.
Okay.
Scott comes with some of his projects that Wearables Maker I was telling you about from Teardown, Sophie Wong. She attends as well. That seems like an incredible community. Just at Teardown for the first time, I went to Control H makerspace here in Portland.
I haven't been to that one.
Just the friendliest group of folks, you know, really nice space. They have cool hardware. You can talk about joining, but, you know, meetup, local makerspaces. I think they're both fantastic avenues for getting in touch with some folks.
Who not only have these devices, but are open and willing to share. The lucky thing is, you know, if you live somewhere remote, you really don't need these resources. The guides online, you know, there are tons of YouTube videos.
Yeah, the YouTube videos. I suspect YouTube is pretty good.
I keep meaning to make my own. So maybe one of these days that'll happen. But, you know, I do kind of have a lot of devices and a lot of toys, but I didn't, you know, go out and buy these things all at once. Kind of worked my way up to it.
Yeah, that makes a lot of sense to start that way. I guess you could always, if you live in a place that doesn't have a meetup port, you could start your own, right? Like meetup.com is free and easy to use. Or even just create a virtual one, right? Like there's some virtual meetups, you know, that'd be pretty cool as well.
So yeah, it just seems like this is the kind of stuff that's more fun when shared. You kind of discover like, oh, you use that kind of nectar and you use it this way. That's really cool. I'm going to try that, right?
I think so as well. Adafruit has an online show and tell that's remote, you know, live stream sort of thing. So I haven't joined yet, but I keep meaning to.
Yeah, yeah. That sounds like a real fun one. All right. I guess we should wrap things up with a hashtag.
My coworker, Lena Hall, she's in the big data space. She gave me this idea for my PyCon US keynote. She told me to find a hashtag that hadn't been used yet.
You found a good one.
I found a good one. So it's hashtag Python hardware. So if you are interested in what the Python community is doing with hardware, if you want to share your own projects, if you want to talk about people that you're learning from or people that you're teaching, check out Python hardware on Twitter.
I've seen some activity after Python. So we had a flurry of posts and it did kind of drop down a little bit, but I really want to keep the hashtag going.
Yeah, let's keep it alive. And we'll obviously podcast listeners out there can use it and share little videos, pictures of what they're working on, their projects or GitHub, whatever, right? Like that'd be great to like bring that together.
Please do. Whenever I'm having a bad day, I'll go and look at that hashtag and be like, how can I be frowning right now when, you know, there are all these excited people doing these cool things with Python.
Inspired from your talk, right?
Oh, not just your talk, but now I'm blushing.
No, it was a good talk. And I actually linked to your Python keynote as well. It has a lot of pictures of what you're talking about here.
I'll try to post some pictures as well that will link to some of the show notes around it. But yeah, you know, this is really fun. Thanks for sharing all the stuff that you've been up to.
Yeah, thanks for having me.
You bet. Now, before you get to go, two quick questions. I kind of know the answer to this first one after watching work. But if you're gonna write some code, what editor do you use?
I'm a fan of VS Code, especially for this workflow in particular. Something that, you know, folks don't know is these devices are, they are trustworthy, but you don't want to have the only copy of your code loaded on here.
So you do want to have a copy locally, you know, preferably version controlled and get or in GitHub. And so the nice thing about using VS Code for this type of programming is I'll have a workspace, right?
So one of my workspace folders, to back up a little bit, a workspace kind of allows you to organize different folders, just kind of in one common area and work across them as well.
Right, even if they're not within the same parent or something.
Yes, yeah. Which is really great. So I'll have my, you know, CircuitPython folder, which is nice if the device is plugged in in there. But I'll also have my local folder in that same workspace. And that's the one that's version controlled and everything.
And if you have multiple devices plugged in at once, that's also very nice. My original editor that I loved was Emacs. And so I use VS Code with Emacs key bindings.
All right. Yeah, that sounds really good. And you just copy the file over to code.py whenever you want to run that code. That's great. And then notable PyPI package or other library, I guess you can use in this case, like stuff that's cool that helps you, you know, maybe do some CircuitPython.
There's no PyPI package that I'm thinking of. But one of the awesome Adafruit employees, her name is Katni. She writes a lot of guides. So she wrote a lot of the code and reference material that was on your Circuit Playground Express at PyCon.
So I would say check out her repositories for just really good ideas for how to get started with a lot of these things. And then the next is kind of a call to action for Brian Oken, because he was having a chat with Scott about the future of testing on CircuitPython. So maybe, maybe...
pytest extension, maybe, Brian.
Maybe, yeah.
Yeah, the gauntlet's been thrown down. So now he's got to do it.
Yes, Brian. Please do.
Perfect. All right. So people want to get involved in CircuitPython and Embedded Python, all this stuff. Where should they go? What should they do? Like, what should you leave them with?
Yeah, so CircuitPython.org is a great resource for kind of downloading stuff, getting started. GitHub.com slash Adafruit slash CircuitPython for the repo. There's also a Discord that's full of really friendly folks. And the community, just like with Python, is what makes this really, really special. So get involved if you can.
Awesome. Well, thanks again, Nina. It was great to talk to you.
Thanks for having me on the show.
You bet. Bye.
This has been another episode of Talk Python to Me. Our guest on this episode was Nina Zakarenko, and it's been brought to you by Ting and Rollbar.
Ting is the fast, mobile network, custom-built for technical folks. Use their savings calculator to see exactly what you'd pay. Visit python.ting.com to get a $25 credit and get started without a contract.
Rollbar takes the pain out of errors. They give you the context and insight you need to quickly locate and fix errors that might have gone unnoticed until users complain.
Of course. Track a ridiculous number of errors for free as Talk Python to Me listeners at talkpython.fm/Rollbar.
Want to level up your Python? If you're just getting started, try my Python Jumpstart by Building 10 Apps course.
Or, if you're looking for something more advanced, check out our new Async course that digs into all the different types of Async programming you can do in Python.
And, of course, if you're interested in more than one of these, be sure to check out our Everything Bundle. It's like a subscription that never expires.
Be sure to subscribe to the show. Open your favorite podcatcher and search for Python. We should be right at the top.
You can also find the iTunes feed at /itunes, the Google Play feed at /play, and the direct RSS feed at /rss on talkpython.fm.
This is your host, Michael Kennedy. Thanks so much for listening. I really appreciate it.
Now get out there and write some Python code.
We'll see you next time.