1 00:00:00,000 --> 00:00:03,000 [Music] 2 00:00:03,000 --> 00:00:07,000 Welcome to the Circuit Python Show. I'm your host, Paul Cutler. 3 00:00:07,000 --> 00:00:15,000 This episode I'm joined by Jeff Epler. Jeff has been a computer programmer since he first started typing in program listings on a Commodore VIC-20 when he was eight years old. 4 00:00:15,000 --> 00:00:20,000 Jeff's hobbies include electronics, 3D printing, photography, and beer and winemaking. 5 00:00:20,000 --> 00:00:25,000 Since 2019, Jeff has been sponsored by Adafruit to work on Circuit Python. 6 00:00:25,000 --> 00:00:28,000 [Music] 7 00:00:28,000 --> 00:00:32,000 Jeff, welcome to the show. Hi, it's good to see you, you know, here in the holidays. 8 00:00:32,000 --> 00:00:36,000 It's nice to have something because otherwise I'm taking this week off. 9 00:00:36,000 --> 00:00:39,000 How did you first get started with computers and electronics? 10 00:00:39,000 --> 00:00:46,000 So I first got started with computers when my dad bought a Commodore VIC-20 and you could type in the basic programs from the manual. 11 00:00:46,000 --> 00:00:51,000 And I was like instantly hooked and I've just been doing computers ever since. 12 00:00:51,000 --> 00:00:53,000 So that was sometime back in the 80s. That's a few years ago. 13 00:00:53,000 --> 00:00:59,000 How did you first get involved in open source? You mentioned on your blog that you've been involved with open source for almost 20 years. 14 00:00:59,000 --> 00:01:10,000 I was just starting to use Unix computers at the university and there was this Linux thing that was starting to, people were starting to talk about it and I put it on one of my home computers. 15 00:01:10,000 --> 00:01:20,000 And I just thought this is great. I love the idea of sharing with people and collectively benefiting from the programming effort that we all put in. 16 00:01:20,000 --> 00:01:30,000 And there are some problems like with that original generation, the philosophy of those original generation of open source, free software people. 17 00:01:30,000 --> 00:01:39,000 And I think we need to work on that and make it more inclusive. But I still think that core idea of I want to make stuff and it doesn't take anything away from me to share that with you. 18 00:01:39,000 --> 00:01:44,000 I think that's just one of the most wonderful things that I can do. I love it. 19 00:01:44,000 --> 00:01:47,000 I agree. How did you discover CircuitPython? 20 00:01:47,000 --> 00:01:56,000 I was hovering in the Adafruit sphere and picked up one of the Trinket M0 boards. I'm like, this is under $10. It runs Python. 21 00:01:56,000 --> 00:02:02,000 I just have to see what this is because I've been programming Python since Python version 1.3. 22 00:02:02,000 --> 00:02:12,000 So again, a long time ago, this was the 90s and it was my favorite programming language. And just the idea to be able to do it on hardware was super cool. 23 00:02:12,000 --> 00:02:21,000 You're one of the few core developers for CircuitPython. Being a core developer is more than just writing C or Python code. How do you view your role as a core developer? 24 00:02:21,000 --> 00:02:35,000 So what I like to do is enable people to do cool stuff. I'm really inspired by my colleagues, in particular Erin, who goes by FirePixie, just does these amazing things. And CircuitPython is inside that. 25 00:02:35,000 --> 00:02:47,000 So I remember collaborating with her on the Banjo project and this was, Limor's idea was, let's do something that uses MicroLab, which a community member created. 26 00:02:47,000 --> 00:02:57,000 And it's a version of NumPy that runs within CircuitPython. And Limor thought, well, we can do something that is sound reactive with this because we can get the sound in and process it and do something. 27 00:02:57,000 --> 00:03:08,000 And Erin's idea was, I want a light up ukulele. And I was kind of in the middle and, you know, figured out how do we do some effects. And she made a beautiful project out of it. 28 00:03:08,000 --> 00:03:14,000 Limor was happy and I'm like, this is, you know, I want to help people make beautiful things. 29 00:03:14,000 --> 00:03:26,000 I love that project. That was one of the first projects that I kind of deconstructed and to recreate my own audio reactive project. And that one has that one has a very fond place in my heart for me. 30 00:03:26,000 --> 00:03:37,000 Yeah, there's a lot of stuff going on in that because I think Rose Hooper had recently done the stuff that let you like treat two strands of LEDs like they were one strand of LEDs by renumbering them. 31 00:03:37,000 --> 00:03:42,000 And so it was just a bunch of things came together from the community to make that project happen. 32 00:03:42,000 --> 00:03:51,000 You've shared on Adafruit show and tell various retro keyboards that can be used with CircuitPython and the machine you've restored. Do you have a favorite type of retro computer? 33 00:03:51,000 --> 00:04:02,000 You know, I have a weakness for the Commodore computers because that's what I grew up on. So like to this day, people make new graphical and sound demos for the Commodore 64. 34 00:04:02,000 --> 00:04:09,000 One of my favorite people who's making software on the Commodore and he's making music is Linus Akison. 35 00:04:09,000 --> 00:04:20,000 I'm sure I'm butchering his name, but he's created kind of a guitar style thing with a with a slider that that doesn't affect and you play on the keyboard with one hand. 36 00:04:20,000 --> 00:04:28,000 He's created a musical instrument he calls the Com-Accordion, which you operate it kind of like an accordion and again with the keyboard to create the notes. 37 00:04:28,000 --> 00:04:35,000 And I'm like this, this is amazing. I don't do retro computing at this level, but I love looking at people who are doing it. 38 00:04:35,000 --> 00:04:43,000 And he puts out amazing stuff and that's on Commodore. So I'm going to pick Commodore as kind of my favorite. It was a really cool, cool company with cool ideas. 39 00:04:43,000 --> 00:04:53,000 Looking ahead to CircuitPython 9, which should be out sometime in 2024, CircuitPython 9 now supports the Memento, the new open source CircuitPython powered digital camera. 40 00:04:53,000 --> 00:04:57,000 What were the challenges in bringing JPEG support to CircuitPython? 41 00:04:57,000 --> 00:05:00,000 If I say it was easy. 42 00:05:00,000 --> 00:05:08,000 So again, it's the power of open source. We had identified from some other projects we did at Adafruit that there were some JPEG libraries out there. 43 00:05:08,000 --> 00:05:17,000 And the one that I picked after looking at them and getting advice from other people is, I think, TJPEG deck, which was written by somebody else. 44 00:05:17,000 --> 00:05:27,000 It's designed to run on microcontrollers. And really, it was quite easy to slot that into CircuitPython and get the very first, you know, I've got a JPEG image represented in memory. 45 00:05:27,000 --> 00:05:33,000 And now I want to put that in a bitmap and show that in some way. That was like a day of work. 46 00:05:33,000 --> 00:05:39,000 But then after that, it's like, but how do we turn this into something that is useful? 47 00:05:39,000 --> 00:05:45,000 So for instance, maybe your JPEG file is coming from the internet, or maybe it's coming off of a file on an SD card. 48 00:05:45,000 --> 00:05:52,000 Maybe it's bigger than your display, so you're going to scale it or crop it or I don't know. 49 00:05:52,000 --> 00:05:58,000 So the process of figuring out those things and figuring out what options are we going to support, 50 00:05:58,000 --> 00:06:07,000 and so in particular, you can scale it down by a factor of two or four or eight, and then you can crop it as you need to to fit it on your device display. 51 00:06:07,000 --> 00:06:11,000 And then like I said, reading it from a socket or a file, that took a lot longer. 52 00:06:11,000 --> 00:06:22,000 And then the next thing that I'm going to do, hopefully with some collaboration with Melissa, is to put this into the library we call Portal Base. 53 00:06:22,000 --> 00:06:28,000 And then it will start just being that much more available to use across the range of devices with screens, 54 00:06:28,000 --> 00:06:35,000 which includes things like the original Pie Portal, the MagTag with the E-Ink display, although I haven't tried that yet. 55 00:06:35,000 --> 00:06:37,000 It should work. It should be cool. 56 00:06:37,000 --> 00:06:42,000 And then newer stuff like the Qualia board, which works with all kinds of different displays. 57 00:06:42,000 --> 00:06:52,000 So this is also useful relative to the camera product that you were asking about, but we kind of conceived it more relative to the display-oriented products. 58 00:06:52,000 --> 00:06:59,000 The camera project has been a long time in the works, and a lot of that is because of parts shortage and Limor's time. 59 00:06:59,000 --> 00:07:04,000 And now that we finally got the stuff to build that camera, it's really, really exciting. 60 00:07:04,000 --> 00:07:10,000 But yeah, the JPEG decoding is more about, you know, I want to show a picture from the internet on my device, 61 00:07:10,000 --> 00:07:16,000 and being able to use it to show a picture from your camera on your device is also kind of a serendipitous thing. 62 00:07:16,000 --> 00:07:17,000 That's great. 63 00:07:17,000 --> 00:07:24,000 2023 was another busy year with CircuitPython 9 development, Synth.io, JPEG.io, which we just talked about. 64 00:07:24,000 --> 00:07:29,000 Tell me about the work that you did at the end of the year to add a lot of new fonts to CircuitPython. 65 00:07:29,000 --> 00:07:32,000 So one of the things, you know, it's always serendipity. 66 00:07:32,000 --> 00:07:36,000 What did we do that enabled something else? 67 00:07:36,000 --> 00:07:42,000 And in this case, going back to the Memento camera, it has an autofocus mechanism. 68 00:07:42,000 --> 00:07:45,000 I'm going to connect this in a minute. Just bear with me. 69 00:07:45,000 --> 00:07:51,000 It has an autofocus module, and that actually runs a little program in it. 70 00:07:51,000 --> 00:07:58,000 So there's a firmware that CircuitPython uploads to the camera module that makes the autofocus operate. 71 00:07:58,000 --> 00:08:04,000 And so we needed to include that firmware file within the library, which is called PyCamera. 72 00:08:04,000 --> 00:08:08,000 And we didn't have support for that in the bundle builder. 73 00:08:08,000 --> 00:08:12,000 There was no way to include a binary Python. You could only include Python files. 74 00:08:12,000 --> 00:08:17,000 And so I did some work, and this ends up like spreading across several things, 75 00:08:17,000 --> 00:08:21,000 because you have to make sure it works in the bundler, which creates the zip file with all the stuff inside it. 76 00:08:21,000 --> 00:08:26,000 And then you make sure that CircUp works, and then you make sure that the system that we have on library, 77 00:08:26,000 --> 00:08:28,000 which I think is called BundleFly, works. 78 00:08:28,000 --> 00:08:30,000 And that worked fine. That was great. 79 00:08:30,000 --> 00:08:34,000 Actually, both of those worked, but anyway, a lot of iteration until that worked. 80 00:08:34,000 --> 00:08:39,000 And then I was thinking, what else do we want to put in libraries? 81 00:08:39,000 --> 00:08:44,000 And the idea that came to mind was, well, it's kind of a pain to install a font in CircuitPython. 82 00:08:44,000 --> 00:08:46,000 We don't really have a way to install a font. 83 00:08:46,000 --> 00:08:51,000 You copy it on, and then you have to write some lines to say what is the path to the font, 84 00:08:51,000 --> 00:08:54,000 and open the font and get the font object and all this. 85 00:08:54,000 --> 00:08:58,000 And I had the vision that you would just be able to say from module name import font, 86 00:08:58,000 --> 00:09:02,000 just like we can say from terminal IO import font, and I wanted it to be that easy. 87 00:09:02,000 --> 00:09:10,000 And with this thing where we could bundle a bitmap format font within a CircuitPython library 88 00:09:10,000 --> 00:09:12,000 and install it with CircUp, it's like, this is easy. 89 00:09:12,000 --> 00:09:19,000 And the other thing that made me think of this is our community member, Naradoc, has put together, 90 00:09:19,000 --> 00:09:24,000 I'm not going to get the name right, but it is a bundle that is full of keyboard layouts. 91 00:09:24,000 --> 00:09:30,000 So, like, a key thing that a lot of people do with CircuitPython is they use it to synthesize, 92 00:09:30,000 --> 00:09:34,000 to create a USB HID device and then do things like send keystrokes. 93 00:09:34,000 --> 00:09:40,000 And if you want to type a string, like "Hello, Mom," on a keyboard, you need to know the layout of the keyboard. 94 00:09:40,000 --> 00:09:44,000 On a German keyboard, the key that we label Q has some other letter on it. 95 00:09:44,000 --> 00:09:49,000 I think it's A. You can't just type A. You have to know the position and then what that's going to do. 96 00:09:49,000 --> 00:09:56,000 So, anyway, Naradoc created a bundle with all, or not all, but a great number of world keyboards 97 00:09:56,000 --> 00:09:58,000 that you can easily install with CircUp. 98 00:09:58,000 --> 00:10:05,000 So this is the other thing that made me realize we can create a bundle, not by writing each individual library, 99 00:10:05,000 --> 00:10:12,000 but by creating them with a series of scripts, which is how Naradoc approached the problem. 100 00:10:12,000 --> 00:10:14,000 And I'm like, we're going to put this idea together. 101 00:10:14,000 --> 00:10:15,000 We're going to put this idea together. 102 00:10:15,000 --> 00:10:22,000 And the consequence is now there are a little over 2,000 libraries that you can install. 103 00:10:22,000 --> 00:10:25,000 And each one is a particular font at a particular point size. 104 00:10:25,000 --> 00:10:28,000 And then it's either like just the ASCII and Western Europe characters, 105 00:10:28,000 --> 00:10:31,000 or it's all of the characters included in the font. 106 00:10:31,000 --> 00:10:36,000 And then, of course, the other thing is people put amazing fonts online for free, you know, 107 00:10:36,000 --> 00:10:37,000 that anybody can download and use. 108 00:10:37,000 --> 00:10:41,000 And so it's just putting this, putting things together from all different people 109 00:10:41,000 --> 00:10:47,000 and then enabling people to use it in their project and actually, yeah, it was really cool. 110 00:10:47,000 --> 00:10:48,000 I'm really excited about it. 111 00:10:48,000 --> 00:10:50,000 I'll make sure I link to those in the show notes as well. 112 00:10:50,000 --> 00:10:51,000 Thank you. 113 00:10:51,000 --> 00:10:53,000 Last question I ask each guest. 114 00:10:53,000 --> 00:10:57,000 If you're going to start a new project or prototype, which board do you reach for? 115 00:10:57,000 --> 00:11:02,000 Well, I mean, the first thing I would do is if you're not totally new to electronics, 116 00:11:02,000 --> 00:11:04,000 check whether something that you already have runs CircuitPython. 117 00:11:04,000 --> 00:11:06,000 We've got a couple hundred boards. 118 00:11:06,000 --> 00:11:11,000 You know, I talked earlier about my experience of starting with like the very cheapest board. 119 00:11:11,000 --> 00:11:19,000 And I wouldn't quite go to the very cheapest board, but the QDPI ESP32-S3 with 2MB PSRAM, 120 00:11:19,000 --> 00:11:22,000 I was looking this up, is like $1250. 121 00:11:22,000 --> 00:11:25,000 It's a cute little board, but you can add a display to it. 122 00:11:25,000 --> 00:11:27,000 You can add all kinds of sensors to it. 123 00:11:27,000 --> 00:11:29,000 And just for that getting started, it has a NeoPixel, 124 00:11:29,000 --> 00:11:33,000 so you can write a Python program to make it show rainbows, which is kind of where everybody starts. 125 00:11:33,000 --> 00:11:35,000 So go with the QDPI. 126 00:11:35,000 --> 00:11:39,000 This one I suggest has Wi-Fi, yeah, and you can add a bunch of stuff to it. 127 00:11:39,000 --> 00:11:42,000 And it was about, I think it was $1250 on the Adafruit store. 128 00:11:42,000 --> 00:11:44,000 So I think it's a really good choice. 129 00:11:44,000 --> 00:11:45,000 That's a great pick. 130 00:11:45,000 --> 00:11:49,000 It has the Stema QT, which makes it easy to add sensors and other stuff to it as well. 131 00:11:49,000 --> 00:11:55,000 Yeah, and then like the, what is it, there's a display BFF add-on board, 132 00:11:55,000 --> 00:12:00,000 which lets you put a TFT display and a lot of options to add on to that. 133 00:12:00,000 --> 00:12:04,000 Jeff, if more people want to learn about you or your work, where should they go? 134 00:12:04,000 --> 00:12:10,000 So I think probably the best thing to do is you can follow people on GitHub and kind of see what they're doing, 135 00:12:10,000 --> 00:12:16,000 because I don't necessarily write a lot about what I'm doing, which is mostly work for Adafruit, 136 00:12:16,000 --> 00:12:19,000 but you can see there, oh, Jeff is working this week on X. 137 00:12:19,000 --> 00:12:22,000 I am on Mastodon. 138 00:12:22,000 --> 00:12:24,000 That's not a super technical account. 139 00:12:24,000 --> 00:12:26,000 We will put that link in the show notes for you. 140 00:12:26,000 --> 00:12:31,000 And then I have a blog that's very occasionally updated, more with technical stuff, 141 00:12:31,000 --> 00:12:39,000 but just a handful of posts last year, and that is at unpythonic.net, which has been my domain since 2001. 142 00:12:39,000 --> 00:12:40,000 Well, that's great. 143 00:12:40,000 --> 00:12:42,000 Jeff, thanks so much for being on the show. 144 00:12:42,000 --> 00:12:44,000 All right. Have a good one. 145 00:12:44,000 --> 00:12:46,000 Thank you for listening. 146 00:12:46,000 --> 00:12:49,000 Transcripts are available in most podcast players, 147 00:12:49,000 --> 00:12:54,000 and show notes are available at www.circuitpythonshow.com. 148 00:12:54,000 --> 00:12:57,000 Until next time, stay positive. 149 00:12:57,000 --> 00:13:12,600 [ Silence ]