Learn Python with Talk Python's 270 hours of courses

#221: Empowering developers by embedding Python Transcript

Recorded on Monday, Jun 24, 2019.

00:00 Michael Kennedy: How do we get kids excited about programming? Make programming tangible with embedded devices. Did you know that after a kid learned to code with the BBC micro:bit, 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 Zakharenko. 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 @talkpython. 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 checkin' it out. Now let's get to the interview. Nina, welcome to Talk Python.

01:48 Nina Zakharenko: Hi, thanks for having me.

01:49 Michael Kennedy: 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, and some of these other Python conferences, with hardware, and embedded Python, and a lot of cool stuff you're doing.

02:04 Nina Zakharenko: I'm really glad to be here, and we're recording a special episode from Portland from my home office.

02:10 Michael Kennedy: That's right, yeah, we both live in Portland, so doin' 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'd you get into programming and Python?

02:21 Nina Zakharenko: 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?

02:36 Michael Kennedy: Yes, yes I remember Hanson. The boy band, right?

02:39 Nina Zakharenko: 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.

02:53 Michael Kennedy: GeoCities, like people might not even remember GeoCities, right? That was... Those were early days. Like if you just had a website, people were impressed. It didn't matter what it was.

03:02 Nina Zakharenko: Yeah, it was like, kind of 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.

03:17 Michael Kennedy: For sure. So, you had this thing against Hanson. All right and how'd that get you to programming?

03:24 Nina Zakharenko: 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, of 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.

03:52 Michael Kennedy: Yeah, that's really awesome. So how'd you get into Python from there, 'cause GeoCities and HTML, view source, that's all just the web front-end stuff.

04:00 Nina Zakharenko: There was some period in my life where I called myself a full stack developer, but I was always you know, that half-drawn horse full stack developer? 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.

04:23 Michael Kennedy: Yeah, lot of forms over data and data entry. And all that kind of stuff?

04:27 Nina Zakharenko: 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, 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. 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. It's going to be so horrible. And then I showed up and I was just overwhelmed with how friendly the community was.

05:22 Michael Kennedy: Yeah, I had the same experience. When I was getting into Python I thought, it was rough, and you said you came from Java. 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 people were super supportive and friendly, and I really thought it was a special place. It just made me want to get into it even more and so on.

05:45 Nina Zakharenko: Yeah, I came back from my first PyCon and I was like how do I do this more? Because people were, they weren't just kind of friendly to me and welcoming me, they were really generous with their time as well. So one of the first sprint projects that I worked on, it was something that I had met who was an engineer at Google who instead of sprinting on a big fancy open-source project, just sat with me and helped me, and talked through some of the issues I was having with my own code. And I was just, I mean I was floored, right?

06:14 Michael Kennedy: Yeah, I know. Why is this person who's like such a high-end developer messing with my stuff, right?

06:18 Nina Zakharenko: Yeah but they were so happy to do it.

06:20 Michael Kennedy: Yeah, that's awesome. That's definitely kind of, epitomizes what the Python community is like, and why so many people stay and love to work there.

06:27 Nina Zakharenko: And I try to pay it forward.

06:29 Michael Kennedy: Absolutely, and I definitely do think you do, and it's worth pointing out that you gave the closing. Was it closing keynote? At PyCon?

06:35 Nina Zakharenko: It was, yeah.

06:36 Michael Kennedy: Yeah, so you were basically, you were stressed out the whole PyCon.

06:40 Nina Zakharenko: Hey, yes.

06:41 Michael Kennedy: 'Cause at least for me like, we were talking earlier like, it's hard to relax if you're giving conference presentations and stuff, until they're over, and if you're the last one you got to just like, hold your breath all 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. So nothing wrong with that. 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?

07:16 Nina Zakharenko: Mm hm.

07:17 Michael Kennedy: So it's cool to do really useful stuff or really playful stuff I guess rather. Not useful stuff, maybe even. So one of the themes of your talk that I wanted to start off with and discuss with you is, you said that software doesn't have to be serious. What's the story of that?

07:32 Nina Zakharenko: Not a lot of people know this about me but now they will. When I was in high school I was just totally goth. Just had dyed black hair, I had a lot of piercings, and when I graduated college I was like nobody is going to give me a job if I look like this.

07:50 Michael Kennedy: Yeah, I can't work at IBM like, where's the, formal dress code of this place is not going to mesh with me, right?

07:57 Nina Zakharenko: Yeah, 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, 'cause they were the first ones to take out to a nice dinner and I was like whoa. So I just kind of fell into it without really knowing what I was getting myself into and I just, 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. Not just tutorials or quizzes, or whatever, that I started spending a lot more time on it and kind of getting really interested.

08:44 Michael Kennedy: Right, the stuff you do at the financial place is not a super fun thing to take home and work on, right? So you got to find something else. Yeah, that's cool.

08:52 Nina Zakharenko: So I showed you this headdress, this LED kind of headdress that I built with flowers and, it's really beautiful, and I worked on that for hours.

09:02 Michael Kennedy: 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. 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 probably like a big circular fan type headdress, and it probably fans out about a foot or so, and it's got all these LEDs that are going. It's super cool, and so that you built with Arduino, right?

09:31 Nina Zakharenko: That's right. So that does not run Python. I used something called the FastLED Library.

09:35 Michael Kennedy: That's one's just about really animating LEDs. So that's kind of a, it's actually a big thing, and it's pretty omnipresent. 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?

09:51 Nina Zakharenko: It's not interactive, but there is a push button. So there's six or seven patterns that I programmed.

09:56 Michael Kennedy: Okay, yeah, so there's some interactivity to it. Okay, awesome. All right, so you did that and you're like hey, this 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, more little boards and devices you can get, right?

10:14 Nina Zakharenko: Yeah, this field is, at least for Python, it's still very, very new. So all the software, all the devices, there's a lot of excitement in that space, and things are kind of moving pretty quickly.

10:26 Michael Kennedy: For sure. So I guess maybe the headdress you described maybe falls under arts. There's also animations, but like actual graphical animations that people can play around with. Have you seen the programming music with Python like the FoxDot stuff before?

10:40 Nina Zakharenko: No I haven't.

10:40 Michael Kennedy: Oh my gosh, yeah, maybe I'll put a link to it. There's some really cool stuff people are doing with live performance, music, with Python, and so there's just all these really great ways that are very far away from people's jobs. That lets you play with code instead of just take your work home with you, which I think that's great.

10:59 Nina Zakharenko: There was a conference here in Portland over the weekend called Tear Down 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 so 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 Chiptunes DJ.

11:34 Michael Kennedy: Yeah yeah, that's awesome. That sound like so fun and doin' 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 I guess, let's start this conversation with how do I write code in Python and run code? So if I were to go to my Mac and type Python, I would 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, who knows? Something like that. Maybe talk us through the options and like why you would choose one or another.

12:21 Nina Zakharenko: Some of the kind of Arduino options you can just run straight Python on there.

12:26 Michael Kennedy: And this is CPython that we all know and love?

12:27 Nina Zakharenko: I believe so yeah, but the downside is the devices are a little bit bigger, they're a little bit less lightweight.

12:33 Michael Kennedy: Use more battery, probably.

12:34 Nina Zakharenko: Use more battery and they're kind of geared towards a more advance audience. MicroPython, I haven't actually 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 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...

13:07 Michael Kennedy: Right.

13:09 Nina Zakharenko: 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.

13:15 Michael Kennedy: And that's important because it can be super frustrating with some of these things. They're kind of glitchy. Like I've only done mostly web development and server-side programming and stuff for a long time, and recently 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. They're really cool, and they do work, but they all take like a special little setup. It's a little tricky to get started, right? Not hard, but you got to find the right volume, and aw this one's not connecting, and just like that kind of stuff, right?

13:50 Nina Zakharenko: Yeah, you know, I mess with mine probably more than most but the goal for these CircuitPython devices is that you just plug it in and it shows up as a drive and if you're not 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.

14:16 Michael Kennedy: Okay, like little Python libraries you can use and stuff?

14:19 Nina Zakharenko: 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 Circuit Playground Express has the built in ring, so a lot of kind of helper methods for things like that.

14:40 Michael Kennedy: That's really cool. This portion of Talk Python To Me is brought to you by Ting. Let me tell you about Ting, the new mobile service available in the US. This 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 dot T-I-N-G dot 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 clink 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, you got a bunch here we're going to talk to. They're going to be really fun. Everyone who attended PyCon got a CircuitPython Express, is that what it's called?

15:59 Nina Zakharenko: Circuit Playground Express.

15:59 Michael Kennedy: Circuit Playground 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?

16:13 Nina Zakharenko: About two inches.

16:14 Michael Kennedy: Yep, and maybe describe all the stuff that is on this little, tiny, super-thin, device here.

16:21 Nina Zakharenko: 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 tear-down workshop and it involved a lot of soldering.

16:30 Michael Kennedy: Yeah, with 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.

16:37 Nina Zakharenko: Yeah it definitely is and not yesterday, I've gotten a lot better at it, but definitely when I was first starting out, I've gotten like little burns here and there. So you do have to be really careful. You have to think about polarity of things. Am I putting it in the right way? Am I using the right components? Even breadboarding, 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 ring of LEDs around it.

17:27 Michael Kennedy: And you probably can connect other stuff like, could you connect a speaker or something to it?

17:31 Nina Zakharenko: So there is a tiny speaker on it.

17:32 Michael Kennedy: That's awesome.

17:33 Nina Zakharenko: 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 can hook up a NeoPixel strip or something pretty easily with just alligator clips.

17:45 Michael Kennedy: Oh 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?

17:55 Nina Zakharenko: There's some inputs in here both analog and digital.

17:58 Michael Kennedy: That's super cool and that whole thing costs like what, $25? It's not super expensive right?

18:03 Nina Zakharenko: Yeah I think these are $25, $35.

18:04 Michael Kennedy: Yeah, so if you want to get started, this is probably a good one, 'cause it has a bunch 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 looks interesting, 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 PyGamer, right?

18:23 Nina Zakharenko: Mm hm.

18:24 Michael Kennedy: So if you're interested in doing little games with like PyGame? That's another good option, and it's more, but it's like $20 more. It's like $49, there's a starter kit for $59. 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 don't fit the, I don't know, the traditional, just plow through the technical bits until you get there. I feel like so much of traditional programming is taught with extreme delayed gratification?

18:59 Nina Zakharenko: Mm hm.

19:00 Michael Kennedy: Okay, you're going to take a course in programming, and this semester you won't really do anything interesting at all. So you're going to have 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? 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 the. 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, 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 much more approachable like early win, get into programming. Then once you're really into it like, okay well, how do I do this looping, because I want to make it cycle, or whatever? I think it's a much more natural way to approach learning programming.

19:48 Nina Zakharenko: I think so as well, yeah. All the code examples that I used in my keynote, I try to make them be, each one, just kind of building on the next. There's just something magical about holding something in your hand, and having it do something, right? Like that just... Like you said, that kind of immediate reward, immediate gratification, and I think whatever we can do in our industry to get not just kids but even just, this is fun for adults, right?

20:12 Michael Kennedy: Yeah. Yeah, yeah, it's super cool.

20:15 Nina Zakharenko: Just get more people interested.

20:17 Michael Kennedy: There's tons of little projects that you could do with this. I mean, if you're into gardening, you could do IoT, like plant monitoring, all kinds of stuff right? It's pretty neat, I love it.

20:26 Nina Zakharenko: I'm still a hobbyist. 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. I'm not an electrical engineer and I never will be, but I can still do a lot with something like this.

20:40 Michael Kennedy: Right, right, you're not mapping out the actual circuit, right, or whatever.

20:43 Nina Zakharenko: Right.

20:44 Michael Kennedy: 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 at programming it, 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 it's a really cool story where the BBC funded giving a little device, kind like what we're talking about, to what grade was it in all the UK?

21:11 Nina Zakharenko: I don't remember.

21:12 Michael Kennedy: Late elementary school, early middle school... Something like 5th, 6th, 7th grade. Something like this right?

21:16 Nina Zakharenko: Yeah, like 11, 12 year olds.

21:18 Michael Kennedy: Yes, exactly. Okay so yeah, there's some really cool stats if you want to tell us about that.

21:23 Nina Zakharenko: Something I really like about this project that they did is they did kind of an exit survey. 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.

21:39 Michael Kennedy: Right, because a lot of people feel like coding for either super geeky people, or super smart people, or maybe the inner section of those. I don't know, it doesn't feel like, oh yeah everyone can just do this right? It feels very...

21:50 Nina Zakharenko: Right.

21:52 Michael Kennedy: You got to know the magic, and 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, this is not something you just walk up to and get a job in, or you become proficient in.

22:08 Nina Zakharenko: Even kind of when I got the first got the hardware stuff on my radar, a lot of the projects that are coming out, I wasn't really kind of particularly interested in them. It wasn't until I started seeing projects, and builds, and guides, and tutorials that were doing things that matched my interests more, matched my aesthetic, that I recognized that it was something that I could try as well.

22:32 Michael Kennedy: Yeah that's awesome like build something you could wear, or like make something awesome for Halloween.

22:35 Nina Zakharenko: Mm hm.

22:36 Michael Kennedy: Right, something like that. It sounds really fun. Yeah, so another stat: 86% of kids who went through it said computer science is a topic that's more interesting to them afterwards?

22:47 Nina Zakharenko: Mm hm. Yeah I think so, like you said, kind of mixing those things in little by little. Looping, control statements, if else, and then seeing it happen.

22:58 Michael Kennedy: Yeah, absolutely. The visual aspect. I think also just learning just enough right? And so I am, I guess we didn't mention this at the top, but it's worth pointing out that the micro:bit ran MicroPython at the time, and actually they started out historically trying to do some other way to program? I don't know if it was like in C, or they were trying to build their own little operating system for it or something, but it wasn't Python and MicroPython until it got a little ways down the road and they were like, "This looks hard, you should use MicroPython.", and they went for it so, that's really what they did.

23:28 Nina Zakharenko: That's awesome.

23:29 Michael Kennedy: Yeah, yeah. And then the last one you said was very near and dear to your heart.

23:33 Nina Zakharenko: Yeah, 70% of girls said that they would choose computer science as a subject option after using the micro:bit.

23:40 Michael Kennedy: That is super cool. I think it really speaks to like the first one. 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? It's a fun thing to work and, like a lot of these projects we're going to talk about are super interesting for girls and boys, but 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? Like maybe I go and order the Circuit Python Express, Circuit Playground Express, sorry, and I get that, and then well, now I have this thing and it's cool but, what do I do, right? How do I get started? What are the steps?

24:22 Nina Zakharenko: 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. So it's not limited to just CircuitPython. So depending on when and where you bought your Circuit Playground Express, it might either already have CircuitPython loaded up on it, which is great. You'll plug it in and you'll see a CircuitPython drive. If you don't, its pretty easy. All you need to do is check out the Adafruit website, and there's instructions for putting this into boot loader mode, and you basically just drag and drop a file, and then CircuitPython's available.

24:55 Michael Kennedy: Okay, thanks.

24:55 Nina Zakharenko: Yeah. And if you picked yours up a PyCon, CircuitPython's already on there so, easy peasy.

25:00 Michael Kennedy: Yeah, yeah, beautiful. Yeah, super easy.

25:02 Nina Zakharenko: 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 CircuitPython in general is with Arduino you would have to write your code, and then there's the compile step, and then there's a step where you have to load it onto your device, then 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 CircuitPython, all you need to do is, if the code.py file's not there, you make it. You type your code in, you save it, and then it auto reloads on the device.

25:46 Michael Kennedy: 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 runs, or it's going to crash, or whatever and we'll talk about debugging them in a little bit. But yeah, it basically just auto refreshes. Kind of like Flask or something in web development. You make a change, it detects, and it just goes, but it's just on the device right? You don't have to like turn it on or start Python? You don't have to do any REPL thing, you just edit a file, by virtue of powering it, it's trying to run that file, and then it just watches for changes, I guess. Something like that.

26:22 Nina Zakharenko: 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.

26:38 Michael Kennedy: Like that $3 one you got at Target or something, right?

26:40 Nina Zakharenko: Right!

26:41 Michael Kennedy: It's $3 dollars, 'cause it probably doesn't carry the data or whatever?

26:44 Nina Zakharenko: Right.

26:45 Michael Kennedy: Okay yeah, so you got to be real careful about that, but other than that, you basically plug in a micro USB thing, and regular USB to your computer and then it's up. You have to find it as volume or a drive, right? So you got to go and hunt that down.

26:58 Nina Zakharenko: So on Mac if you have your finder open, and it'll just show up there on the left-hand side.

27:03 Michael Kennedy: Yeah and that's easy, and it's probably similar on Windows Explorer it probably just shows up as another attached drive or something?

27:09 Nina Zakharenko: I believe so. Actually I don't use a Windows computer. It's ironic, right?

27:13 Michael Kennedy: Yeah, don't you work for Microsoft?

27:14 Nina Zakharenko: I do, yeah.

27:16 Michael Kennedy: You work on this code.py file. It's pretty much straightforward. Do 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 LED's, right?

27:33 Nina Zakharenko: Right.

27:34 Michael Kennedy: But this probably has a bunch of stuff like that you're going to work with.

27:37 Nina Zakharenko: 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 the 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 additional NeoPixel strips or some of the things that you can kind of extend and plug into this, need to live in a library folder. And you just find those dependencies on circuitpython.org.

28:10 Michael Kennedy: I see, so if I want to have some sort of external dependency that's possible?

28:14 Nina Zakharenko: Mm hm, yeah.

28:15 Michael Kennedy: Yeah? Do I pip install it, do I download it and copy over? What's the mechanism? Like I just copy into this library's folder?

28:23 Nina Zakharenko: Yeah you just copy it into the library's folder. There's definitely some additional work that can be thought of with packaging. There's no good way of pegging a dependency to a version, for example but, the project is open-source. And they will gladly...

28:39 Michael Kennedy: Is that where PRs are accepted?

28:42 Nina Zakharenko: Yeah, they'll gladly accept your contributions in the space.

28:45 Michael Kennedy: Yeah, I can imagine that they would. Like you said it's early days right? So it's... Wide open. I feel like it's really growing quite a bit. A lot of interest is developing here, and lot of different angles like The Education Space, People are Makers, all kinds of stuff.

28:58 Nina Zakharenko: I think the key here is 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 but, it'll be really fun for you, too.

29:07 Michael Kennedy: For sure, you can definitely do some cool things. One of the things that I find that's actually a challenge, maybe 'cause 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's a little challenging, but I feel like knowing what extra things go with my device, like what if I want like strips along the wall that light up when it watches me walk by or, it just says, detects me and 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, I just look at all the stuff I could go shopping for at CrowdSource or on adafruit.com 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. How do you address those kinds of things?

29:52 Nina Zakharenko: So I've gotten kind of a lot better about figuring out what parts or components I might need, and how things work together, but until that happened, I 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. 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.

30:24 Michael Kennedy: Okay!

30:25 Nina Zakharenko: Yeah, 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 a astronaut costume that was just amazing and incredible.

30:35 Michael Kennedy: Oh wow, yeah. Yeah, I can imagine the cosplay stuff has really got a lot of cool options, actually.

30:42 Nina Zakharenko: You should check out her guides, 'cause her LED jacket was powered by one of these Circuit Playground Expresses.

30:47 Michael Kennedy: I rode over here on my motorcycle, and I just saw yesterday on YouTube, this guy who had built a helmet like from Tron, it had these LED lights all over it. It had this like, one of these type of chips and batteries on the back. You could do some like super cool stuff with that as well, like have that light up while you're ridin' at night or yeah, it's some really. There's just a lot of cool little projects you could just take on.

31:11 Nina Zakharenko: My only piece of advice in that space is you want to build things incrementally. So you might have this kind of crazy idea of...

31:18 Michael Kennedy: This grand vision.

31:20 Nina Zakharenko: Yeah, this grand vision. 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, and how they work together before you take on a really large undertaking.

31:38 Michael Kennedy: Yeah, yeah even on small things like write one line of code, see it run.

31:42 Nina Zakharenko: Yes.

31:43 Michael Kennedy: 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 and analyze it.

31:50 Nina Zakharenko: Right.

31:51 Michael Kennedy: It's kind of like print statements and, and we should also talk about that. 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?

32:02 Nina Zakharenko: Right.

32:03 Michael Kennedy: If I don't like find a way to connect to it.

32:05 Nina Zakharenko: All the code is running on this little device, and you won't see any output.

32:09 Michael Kennedy: It has no screen, and 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, 'cause it might not be connected to anything, right?

32:19 Nina Zakharenko: If you want to see any debugging output on this you can either use something like the Mu 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.

32:39 Michael Kennedy: Right, so it just listens for the serial output and it prints out whatever it sees right? Which is... So these things, when you connect 'em, they basically appear to your computer like modems, is that right?

32:49 Nina Zakharenko: As a drive.

32:50 Michael Kennedy: As a drive, okay. Yeah, so you connect to them and you get the output and whatnot. That's cool. 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 with that one little thing, and a power cord... A power data cord. There's also PyGamer, which is kind of cool. A little screen, a couple of buttons, and a controller.

33:12 Nina Zakharenko: There's a PyBadge. I have one right here.

33:14 Michael Kennedy: Yeah the PyBadge is super cool. It's got some buttons and a screen, like two sets of buttons, like an A/B button and then like the four arrows, and a little screen on it. Those are both really cool and then I don't know about this one, you probably can tell us, but the PyGamer comes with a starter kit as well with a battery and a speker and a little box it goes into so for me I'm at the super early stage 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.

33:42 Nina Zakharenko: I believe the PyGamer is going to be in the AdaBox that's shipping right now. Yeah.

33:48 Michael Kennedy: Okay!

33:48 Nina Zakharenko: So if you're subscribed, you should get a fun surprise in the mail.

33:51 Michael Kennedy: Oh how cool, how cool. Yeah, some of these things are hard to get a hold of. They keep selling out. So, I guess that's a good sign.

33:58 Nina Zakharenko: Yeah, the PyPortal, it's been a pretty hot seller. I see it...

34:03 Michael Kennedy: So let me describe the PyPortal. The PyPortal is this, let's say, three inch by two inch touch screen and it looks basically just like a touch screen 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 touch screen that you can program with CircuitPython right?

34:23 Nina Zakharenko: The cool thing about this one, it also has internet connectivity.

34:27 Michael Kennedy: Yeah, the internet connectivity is missing from the Playground Express right?

34:31 Nina Zakharenko: Yes.

34:32 Michael Kennedy: And that would be so nice, like the one thing like a little WiFi something. Can you get an adapter to plug into it that works?

34:38 Nina Zakharenko: I don't know. I haven't thought that one through.

34:39 Michael Kennedy: I haven't tried it either, so. I guess you got to decide, what am I trying to build? Does it need internet connectivity?

34:45 Nina Zakharenko: Right.

34:45 Michael Kennedy: Right, right.

34:46 Nina Zakharenko: Do you want to do something IoT related, right.

34:48 Michael Kennedy: Right if it's IoT, then it probably needs that. This portion of Talk Python To Me is brought to you buy Rollbar. I've 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 realtime, 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 realtime 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 realtime, 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.

36:23 Nina Zakharenko: Yes!

36:24 Michael Kennedy: I talked about Legacy Python and how, we're finally moving past Python 2 I think but a while ago someone made something, I think it's pyhthonclock.org. It's something like this, where it's just the countdown until the end of Python 2, 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. You want to just tell us about it?

36:49 Nina Zakharenko: Yeah, so I wanted to make my own desktop Python 2.7 countdown, you know, so I could just keep an eye on it? Didn't have to have a browser tab open.

36:57 Michael Kennedy: Come in in the morning, sit down, and you're like, oh yeah, it's 190 days down.

37:01 Nina Zakharenko: Yeah 190 days, four hours, 31 minutes.

37:04 Michael Kennedy: Right on !

37:05 Nina Zakharenko: The fun thing about this is I rally wanted to use the touch screen capability here, and so I wanted my Python 2.7 countdown timer to match my mood. So there's kind of a bunch of different themes that you can flip through with the left and right side of the touch screen, like colored background, dark background. There's different fonts, so whatever mood you're kind of feeling like that day, more modern, more abstract, that's the version of the Python 2.7 countdown.

37:34 Michael Kennedy: 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.

37:42 Nina Zakharenko: So this was interesting. This was kind of where I bumped into some of the limitations and the quirks of a device like this. So there's no realtime clock on this.

37:55 Michael Kennedy: Right, okay.

37:56 Nina Zakharenko: So you have to go and fetch the time from the internet.

37:59 Michael Kennedy: 'Cause it just does it, it's like Groundhog Day for it. It doesn't know what time it is.

38:02 Nina Zakharenko: Once you kind of unplug it and plug it back in 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.

38:13 Michael Kennedy: You just refresh it, okay. And it's WiFi...

38:14 Nina Zakharenko: Every once in a while.

38:15 Michael Kennedy: So it's no big deal.

38:16 Nina Zakharenko: 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.py file, but it doesn't really work well with captive portals, so if you're at a conference or something and there's a lot of sign-in steps, haven't quite kind of thought that through, so you do kind of have to tether your phone or something else. But yeah, all the graphics are kind of lower level, so the backgrounds that you see, they're either all, I believe 16 bit bitmaps?

38:48 Michael Kennedy: Yeah, and you have a video of this that people can look at so we'll put that in the show notes that people can check it out and watch it going and see what it's like, so that'll be cool.

38:56 Nina Zakharenko: I'll try to share the repo and then a blog post kind of explaining all of the code ready by the time.

39:03 Michael Kennedy: Yeah sure, that would be great. So there's some interesting challenges to programming this, right? It's not just like playing with the terminal or even with like PyGame or Kivy, where you program in some high end graphics thing like OpenGL or something like that right? Like there's not like a graphics card in the traditional sense.

39:22 Nina Zakharenko: No.

39:23 Michael Kennedy: So even getting text on the screen's a little, it requires not hacks, but it requires like funky techniques, right?

39:29 Nina Zakharenko: 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 drop a uncompressed video on here or something like that. You'll run out of room.

39:45 Michael Kennedy: Sure, sure. And you have to do interesting optimizations potentially, like if you're going to animate say, the numbers, right? You maybe have to like pre-allocate all the font representations for 0, 1, 2, 3, and things like this, right?

40:00 Nina Zakharenko: Yeah, you can kind of optimize by saying which characters are you going to be using in the course of your program? Load those from the font.

40:07 Michael Kennedy: Yeah so, you have to think about some things when you're working on these super small devices that maybe we might just overlook, right? That's pretty cool, but yeah, it looks great and we'll put the video of it up. It's going to be fun. So maybe we could walk. You have a whole bunch of hardware: big, small screens, no screens, lights, no lights, hanging right 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.

40:31 Nina Zakharenko: Yeah, I can kind of start from smallest and work my way up. So, this here is a trinket M 0.

40:39 Michael Kennedy: Yeah so this is maybe a quarter inch by one inch, something like that. So two centimeters by like one maybe.

40:48 Nina Zakharenko: Teeny tiny.

40:49 Michael Kennedy: Yeah very tiny.

40:50 Nina Zakharenko: Kind of about the size of a US quarter and pretty basic as well. To be fair I do have a lot of Adafruit devices here. I'm a fan. But there are other devices out there that do run Python or MicroPython or even CircuitPython, but I will kind of talk through what I have in front of me and what I use for my projects. So this is kind of nice, 'cause it does have a micro USB for programming.

41:15 Michael Kennedy: Yeah, it's really nice. It just plugs into like, hey I have a Kindle so I'm just going to grab that or whatever.

41:20 Nina Zakharenko: Yeah!

41:20 Michael Kennedy: I just use that cord or, I have a certain type of Android phone, maybe it just takes that.

41:25 Nina Zakharenko: So there's just like a handful of small, or a handful of inputs and outputs here, and then mounting holes. So if you're really kind of tight for space, this is a good option.

41:35 Michael Kennedy: That's super small.

41:36 Nina Zakharenko: Yeah it doesn't have a port, that JST port for something like a lipoly battery or different kind of battery enclosure like the Circuit Playground Express has, and that kind of plugs in there. So this is a micro USB only, and then this right here is the GEMMA.

41:54 Michael Kennedy: Okay, the GEMMA is really like a quarter?

41:55 Nina Zakharenko: Mm hm.

41:56 Michael Kennedy: Or something like that or so, yeah?

41:57 Nina Zakharenko: This is what was included in the PyCon swag bags last year.

42:01 Michael Kennedy: Right the 2018 one.

42:02 Nina Zakharenko: Mm hm.

42:03 Michael Kennedy: So this was like the dip your toe in the water of the IoT, before the Circuit Playground one.

42:08 Nina Zakharenko: Or programming hardware, 'cause this also doesn't have any internet connectivity on it. The nice thing about this form factor is it's great for electronics and wearables. So it's got these big pads on the sides that you can use to run conductive thread through or conductive paint.

42:25 Michael Kennedy: This thing is super tiny. It's like really about the size of a quarter and maybe thinner than a quarter, except for it's got it's little power thing bumpin' up there. You could probably make some really cool Halloween costumes or something for like a parade. Or, if you're giving a talk, right? You've been known to have some pretty cool devices that you've like secretly worn into the conference talks when you're giving them, right?

42:49 Nina Zakharenko: I used GEMMA M Zeros for my Python powered earring...

42:52 Michael Kennedy: Yeah, that's awesome.

42:53 Nina Zakharenko: That I'm holding right here. I will turn them on. They're bright 'cause they're meant for being worn on like a conference stage so that folks can see me in the back.

43:02 Michael Kennedy: For sure.

43:03 Nina Zakharenko: But these are really, really fun.

43:04 Michael Kennedy: So they're like, it's a big ring of LEDs that are animated, and then like a inner light thing as well, and then this little tiny circular boards that we just talked about is back there with a battery stuck to it.

43:15 Nina Zakharenko: Yep.

43:16 Michael Kennedy: Doing all the magic to make it actually happen, right?

43:17 Nina Zakharenko: Well I did have to do quite a bit of soldering to get everything to work here. There's three layers of LED rings, so they're kind of these individual NeoPixel rings, and you also see that each one of these has pads on the back here, a data-in-data-out, a ground, and a power.

43:36 Michael Kennedy: And did you have to solder these?

43:37 Nina Zakharenko: Yes. 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 a Circuit Playground Express, for example.

43:47 Michael Kennedy: 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 pure programming to the thing.

43:56 Nina Zakharenko: Just some soldering skills. This project was based on a guide by a really cool maker. Her name is Becky Stern, and so her original idea was having this GEMMA with one LED ring, and I wanted to have more LEDs, '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.

44:19 Michael Kennedy: That's really cool. Another one that you were showing me that I thought is pretty cool was with the PyBadge. So with the PyBadge, I'll have to describe it a little bit. 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 does have buttons and stuff, but it's meant to be worn as an actual badge at a conference right? Like instead of like just a printed one or whatever.

44:43 Nina Zakharenko: Yeah, it's what I'm wearing in my Twitter profile picture.

44:46 Michael Kennedy: Okay, really cool, and so you obviously have the screen to put 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 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 stickers, little like cloth ribbons that go in there that indicate a few things, but you had this really cool idea of taking a NeoPixel 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 like right now I'm busy, please don't talk to me or, hey, I'd love to talk to you, come on over. So tell people about this project. This is cool.

45:40 Nina Zakharenko: So the nice thing about this PyBadge, it does have kind of mounting holes, but then you can also use them for just a clip, right? So you can... Right, to run lanyard easily wear it around your neck, and my coworker Tommy, I hope I pronounce his last name right, Tommy Falgout, 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...

46:04 Michael Kennedy: Okay. Yeah, yeah.

46:05 Nina Zakharenko: 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 the PyBadge is not internet connected, and so I thought, how could I make this fun and useful just as wearable? And I think I would label myself as an expovert, you know, at conferences?

46:26 Michael Kennedy: Yeah? Describe that to us.

46:29 Nina Zakharenko: 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 run away and recharge and have quiet time or I slowly kind of get crankier and crankier.

46:48 Michael Kennedy: 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 when I go to PyCon, by the third day I literally have lost my voice...

47:00 Nina Zakharenko: Yeah!

47:01 Michael Kennedy: Because while I love talking to people I just, at some point like my body breaks down and it just says, no you're not taking anymore of this, right?

47:08 Nina Zakharenko: It's so cool. I love that people want to come chat with me, and I never want to be rude or turn someone away, so there's always this conflict of, I need to do some self care, right?

47:19 Michael Kennedy: Right, or I got to be ready for a meeting and presentation in 15 minutes. Like I was at the booth at PyCon, getting ready to do a live presentation, so I was 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 was like, "Oh Michael I'd love to meet you, hey, how's it going?" Like hey, it's really great to meet you but I really need like five minutes because, 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.

47:47 Nina Zakharenko: Yeah!

47:48 Michael Kennedy: It's just times like that at conferences where it's like you would love to be able to like signal that. So PyBadge.

47:55 Nina Zakharenko: I'm going to use the PyBadge for that and an LED strip and there are, I don't want to say proprietary, they're not proprietary, but there are some kind of data outports on here that use a three pin, 20 millimeter, JST clip, so you just kind of have to find and buy the right one.

48:11 Michael Kennedy: Right it's not like you just plug in micro USB or something, right?

48:14 Nina Zakharenko: I have a few here. I saw Scott Shawcroft, the CircuitPython maintainer. He works with Adafruit. I saw him in Seattle early last week and I was like please bring me some of this odd looking adapter. So kind of looks like the, we'll talk about powering your projects a little bit later. It kind of looks like these lipoly JST connectors, there's just one more pin.

48:37 Michael Kennedy: Right, these little white, three pin connectors yeah, huh.

48:41 Nina Zakharenko: So the battery just has two red and black, ground and power. This has three 'cause there's a ground and power and also data. So you can just plug one of these right into the PyBadge, 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 means 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.

49:05 Michael Kennedy: Yeah, and then this connect to the NeoPixels.

49:07 Nina Zakharenko: Yep, that's going to connect to the NeoPixels, and so I'm going to be able to kind of adjust and say, instead of, do I want my photo taken or not, it's like, well maybe if my badge lanyard is red I think, I can also update the message on the PyBadge here saying like, now's really not a good time to talk. Maybe yellow is like only if you really need to, and then if my lanyard green, come up and chat, I'm happy to.

49:31 Michael Kennedy: Right, or it's rainbow colors and blinking or who knows, yeah.

49:33 Nina Zakharenko: Yeah!

49:35 Michael Kennedy: Well just something obvious. And I think that's, yeah, that's super cool. So the lanyard, it basically is like a ring or like a strip of super bright LEDs...

49:43 Nina Zakharenko: Mm hm.

49:44 Michael Kennedy: 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.

49:51 Nina Zakharenko: I'm so grateful to Tommy for this idea and he's actually going to be productizing his version of the LED lanyard badges.

49:59 Michael Kennedy: Oh, super cool.

50:01 Nina Zakharenko: So you'll be able to just go and buy a kit from him.

50:05 Michael Kennedy: Yeah, yeah, cool.

50:06 Nina Zakharenko: Yeah, I think so as well. I'll probably be documenting my build on this and trying to. I'm so bad about, I like getting in the zone and building these things, and I'm really bad about stopping to take pictures.

50:16 Michael Kennedy: Right.

50:18 Nina Zakharenko: And then document it.

50:19 Michael Kennedy: 'Cause along the way you've almost got to rebuild it a second time. And just document it the second time through.

50:24 Nina Zakharenko: 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.

50:40 Michael Kennedy: Yeah, yeah, this looks super cool.

50:42 Nina Zakharenko: And this project is going to involve a little bit of sewing, so so that I can get my badge clip on there.

50:46 Michael Kennedy: 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, 'cause it'll cost some money, right? It won't be as cheap as just the paper, but if they could do it, it would be so cool, right?

51:00 Nina Zakharenko: Yeah, I would love to see that at some point in the future.

51:02 Michael Kennedy: I mean they did give them out in the swag bags, the Playground Circuit Expresses? Circuit Playground Express. It could just be, well, it's not in your bag, it is your lanyard, right?

51:13 Nina Zakharenko: Yeah!

51:14 Michael Kennedy: And it has a little screen. So it's not really that big of a stretch I guess on that regard.

51:18 Nina Zakharenko: No the current iteration is a little fragile so you have to treat it carefully.

51:22 Michael Kennedy: Don't drop it.

51:24 Nina Zakharenko: 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 the power data and the grounds, if this breaks or disconnects, then you lose, you lose connectivity...

51:38 Michael Kennedy: It's done.

51:40 Nina Zakharenko: In the rest of the strip.

51:41 Michael Kennedy: It's like Christmas lights?

51:42 Nina Zakharenko: Yeah, yeah, kind of. It's also, I've been thinking through some ways of wearing it, but I haven't figured out a way to make the length adjustable, without damaging the components inside, so.

51:53 Michael Kennedy: So there are some challenges. Maybe it's not all strip, right? Maybe there's just like two parts that light up or something, and there's like just a gap. I'm sure you'll figure it out.

52:03 Nina Zakharenko: Yeah, that could work. That's always kind of the fun thing about 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.

52:17 Michael Kennedy: It's a really cool idea, and it's one of these sort of practical things, and it definitely sort of fits in with the style of stuff that you're doing, so I think it would be cool. So I guess we have the bag stuffing volunteers at the conference. Now they'll be the lanyard building and programming. That's the day before, right?

52:34 Nina Zakharenko: I bet those volunteers are not too thrilled by that idea.

52:38 Michael Kennedy: No that's got to be a lot of work, right?

52:39 Nina Zakharenko: Mm hm, yeah.

52:40 Michael Kennedy: Cool, all right, well you've got a few other things. You want to just quickly maybe tell us about those?

52:44 Nina Zakharenko: Sure, we talked about the Circuit Playground Express. I think the only thing I haven't shown you so far is this.

52:49 Michael Kennedy: So this one you got from this recent conference you were just at, the Tear Down.

52:53 Nina Zakharenko: I built this at the soldering workshop, and so this is a custom board. It's designed by Thomas Hudson. He's local to Portland. He works for OMSI. He does kind of a lot of electrical work for them.

53:08 Michael Kennedy: OMSI is a really cool industrial and science museum here in town.

53:13 Nina Zakharenko: I'll share a link to his GitHub here. It's actually on the back of the board.

53:16 Michael Kennedy: 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 CrowdSupply on it, and I don't know much about CrowdSupply, 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?

53:32 Nina Zakharenko: It's kind of like a Kickstarter, but for hardware projects.

53:34 Michael Kennedy: That's what I, it's like yeah, Kickstarter specifically focused on these types of things. There's some really cool stuff there. Okay, so.

53:40 Nina Zakharenko: I believe CrowdSupply sponsored this workshop, which is what allowed us to walk away with these boards.

53:46 Michael Kennedy: Sure.

53:47 Nina Zakharenko: So we just kind of started out with the boards here, and then all the components are hand-soldered on in this workshop which was pretty fun, but this is based on the NRF52840 reference board. So this is something that Thomas designed, and it has Bluetooth connectivity on here.

54:06 Michael Kennedy: Couple LEDs, couple buttons.

54:06 Nina Zakharenko: LEDs, a few buttons. And he put a bunch of kind of examples online on his GitHub as well. So this is going to be kind of an interesting reference board and it shows you that if you have the skills and the knowledge you can build your own devices that run CircuitPython.

54:23 Michael Kennedy: 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?

54:32 Nina Zakharenko: This is not in my realm yet. It is something I'd like to learn this year.

54:36 Michael Kennedy: That's super cool. It may never be in my realm, but I admire it. It sure is 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 these embedded devices. So you need to tell people real quick about that.

55:00 Nina Zakharenko: 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.

55:15 Michael Kennedy: And that you can get the print statements there instead of using Mu.

55:18 Nina Zakharenko: 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.

55:34 Michael Kennedy: 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.

55:38 Nina Zakharenko: And you can kind of run stuff, test stuff out. The nice thing about the PyPortal or the PyBadge that has the screen on there, is your REPL will be displayed on the screen.

55:48 Michael Kennedy: That's super cool, I love it!

55:49 Nina Zakharenko: 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.

55:59 Michael Kennedy: The mechanical ones, yeah. They're probably beige.

56:02 Nina Zakharenko: It's very, it's the beigest. So he has one of these PyPortals just stuck on to a keyboard and you can like type in the REPL on this really old school IBM keyboard.

56:12 Michael Kennedy: Oh wow, that's crazy. It probably just has serial input or something straight into it. Whatever the keyboard does.

56:17 Nina Zakharenko: He brought that whole contraption to PyCascades.

56:19 Michael Kennedy: 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 it in Python, but another way is to put a first year computer science student in front of him and ask them to quit, save, and exit. Right, I feel like screen's 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.

56:48 Nina Zakharenko: 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.

56:56 Michael Kennedy: 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?

57:15 Nina Zakharenko: 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.

57:24 Michael Kennedy: Actually that's maybe the coolest part of it, right, is that it comes with a Circuit Playground Express emulator so you can play around a little bit and decide is this for me, is this interesting, then you order the $25 little thing.

57:38 Nina Zakharenko: It's kind of a block-based editor, 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, Steven Universe is a really cute cartoon not just for kids. Personally, I love it. I watched 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. And in the future...

58:14 Michael Kennedy: Javascript, huh?

58:15 Nina Zakharenko: Maybe even Python.

58:16 Michael Kennedy: Maybe, that'd be awesome.

58:16 Nina Zakharenko: Maybe.

58:18 Michael Kennedy: No commitment there, but maybe. That's 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?

58:35 Nina Zakharenko: I don't believe so.

58:37 Michael Kennedy: Okay, maybe someday, but yeah it's pretty good. If it outputs Python, that's kind of good enough, eventually, if it ever does, right?

58:43 Nina Zakharenko: There's a group of interns working in Vancouver for the Microsoft Garage Program, that are doing some really interesting things with CircuitPython and VS Code.

58:53 Michael Kennedy: That sounds really fun. What is Microsoft Garage?

58:56 Nina Zakharenko: It's kind of like a hackspace right?

58:58 Michael Kennedy: Right like a Makerspace type of thing?

59:00 Nina Zakharenko: Makerspace, yeah. So they have access to electronics and devices and kind of the stuff that you would find in a typical Makerspace and they're particularly focusing on Circuit Playground Express so I'm really interested in seeing their project.

59:15 Michael Kennedy: Oh that's super cool, super cool. So I get the sense from sitting here with you with all these cool things, you're 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 Makerspaces or other things like that where people are doing these kinds of things? What advice do you have for people to find other people doing this?

59:43 Nina Zakharenko: Yeah so Meetup is a great resource. If I lived in Seattle, I'd be going to Hardware Happy Hour. Scott comes with some of his projects. That wearables maker I was telling you about from Tear Down, Sophie Wong, she attends as well. That seems like an incredible community. Just at Tear Down for the first time I went to Control H Makerspace here in Portland.

01:00:03 Michael Kennedy: I haven't been to that one.

01:00:05 Nina Zakharenko: Just the friendliest group of folks. Really nice space, they have cool hardware, you can talk about joining but, 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 if you live somewhere remote, you really don't need these resources, but guides online, there are tons of YouTube videos.

01:00:30 Michael Kennedy: Right, yeah the YouTube videos. I suspect YouTube is pretty good.

01:00:33 Nina Zakharenko: I keep meaning to make my own so maybe one of these days that'll happen. But you know I do kind of have lot of devices and a lot of toys, but I didn't go out and buy these things all at once. Kind of worked my way...

01:00:44 Michael Kennedy: Sure.

01:00:46 Nina Zakharenko: Up to it.

01:00:46 Michael Kennedy: 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 for it you could start your own right? Like meetup.com is free and easy to use. Or even just create a virtual one? Like there's some virtual Meetups. That would 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 need that connector and you use it this way? That's really cool I'm going to try that, right?

01:01:10 Nina Zakharenko: I think so as well. Adafruit has like a online show and tell that's remote. You know Livestream sort of things? I haven't joined yet but I keep meaning to.

01:01:18 Michael Kennedy: Yeah, yeah, that sounds like a real fun one. All right, I guess we should wrap things up with a hashtag.

01:01:23 Nina Zakharenko: My core girl 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.

01:01:33 Michael Kennedy: You found a good one!

01:01:34 Nina Zakharenko: I found a good one. So it's #pythonhardware, 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 #pythonhardware on Twitter. I've seen some activity after PyCon. So we had like... a flurry of posts, and it did kind of drop down a little bit but I really want to keep the hashtag going.

01:02:00 Michael Kennedy: 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 GitHub, whatever, right? That'd be great to bring that together.

01:02:10 Nina Zakharenko: 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 there are all these excited people doing these things with Python?

01:02:21 Michael Kennedy: Inspired from your talk, right?

01:02:22 Nina Zakharenko: Oh!

01:02:23 Michael Kennedy: Not just your talk, but.

01:02:24 Nina Zakharenko: Now I'm blushing .

01:02:25 Michael Kennedy: Yeah well it was a good talk, and I'll actually link to your PyCon keynote as well. It has a lot of pictures of what you're talking about here.

01:02:31 Nina Zakharenko: Mm hm.

01:02:32 Michael Kennedy: I'll try to post some pictures as well that we'll link to in some of the show notes around it, but yeah, Nina this was really fun. Thanks for sharing all the stuff that you've been up to.

01:02:40 Nina Zakharenko: Yeah, thanks for having me.

01:02:42 Michael Kennedy: You bet, now before you get to go, two quick questions. I kind of know the answer to this first one after watching you work but, if you're going to write some code what editor do you use?

01:02:49 Nina Zakharenko: I'm a fan of VS Code, especially for this workflow in particular. Something that 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, preferably version controlled in Git, or in GitHub, and so the nice thing about using VSCode 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 one project.

01:03:25 Michael Kennedy: Right, even if they're not... within the same parent...

01:03:27 Nina Zakharenko: Physically. Yes, yeah, yeah.

01:03:28 Michael Kennedy: Or something.

01:03:30 Nina Zakharenko: Which is really great. So I'll have my 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.

01:03:52 Michael Kennedy: All right that sounds really good and you just copy the file over to code.py.

01:03:55 Nina Zakharenko: Mm hm.

01:03:56 Michael Kennedy: Whenever you want to run that code. That's great. And then notable PyPI package, or other library I guess you could use in this case, like stuff that's cool that helps you maybe do some CircuitPython?

01:04:07 Nina Zakharenko: There's no PyPI package that I'm thinking of but one of the awesome Adafruit employees, her name is Kattni, she writs 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 Okken.

01:04:33 Michael Kennedy: Yeah!

01:04:35 Nina Zakharenko: 'Cause he was having a chat with Scott about the future of testing in CircuitPython, so maybe a...

01:04:41 Michael Kennedy: like a pytest extension, maybe, right?

01:04:43 Nina Zakharenko: Mm maybe yeah.

01:04:45 Michael Kennedy: That gauntlet's been thrown down, so now you've got to do it.

01:04:47 Nina Zakharenko: Yes, Brian. Please do.

01:04:49 Michael Kennedy: Perfect, 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?

01:04:58 Nina Zakharenko: Yeah so circuitpython.org is a great resource for kind of downloading stuff, getting started. Github.com/adafruit/circuitpython for the repo. There's also 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.

01:05:19 Michael Kennedy: Awesome! Well, thanks again Nina, it was great to talk to you.

01:05:21 Nina Zakharenko: Thanks for having me on the show!

01:05:22 Michael Kennedy: You bet, bye! This has been another episode of Talk Python To Me. Our guest in this episode was Nina Zakharenko, 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 your 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.

Back to show page
Talk Python's Mastodon Michael Kennedy's Mastodon