Jeff Epler
S04:E35

Jeff Epler

Episode description

CircuitPython core developer Jeff Epler joins the show. He and Paul discuss how he sees his role as a core developer, adding JPEG support to CircuitPython, and adding over 2000 new fonts.

00:27 Welcome Jeff and his start with computers

00:54 How Jeff started with open source

1:45 Discovering CircuitPython

2:12 Jeff’s role as a CircuitPython core developer

3:43 Retro computing

4:43 The Memento camera and JPEG support in CircuitPython

7:17 Adding over 2000 new fonts to CircuitPython

10:53 Which board?

12:05 Follow Jeff:

Download transcript (.srt)
0:00

[Music]

0:03

Welcome to the Circuit Python Show. I'm your host, Paul Cutler.

0:07

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.

0:15

Jeff's hobbies include electronics, 3D printing, photography, and beer and winemaking.

0:20

Since 2019, Jeff has been sponsored by Adafruit to work on Circuit Python.

0:25

[Music]

0:28

Jeff, welcome to the show. Hi, it's good to see you, you know, here in the holidays.

0:32

It's nice to have something because otherwise I'm taking this week off.

0:36

How did you first get started with computers and electronics?

0:39

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.

0:46

And I was like instantly hooked and I've just been doing computers ever since.

0:51

So that was sometime back in the 80s. That's a few years ago.

0:53

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.

0:59

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.

1:10

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.

1:20

And there are some problems like with that original generation, the philosophy of those original generation of open source, free software people.

1:30

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.

1:39

I think that's just one of the most wonderful things that I can do. I love it.

1:44

I agree. How did you discover CircuitPython?

1:47

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.

1:56

I just have to see what this is because I've been programming Python since Python version 1.3.

2:02

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.

2:12

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?

2:21

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.

2:35

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.

2:47

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.

2:57

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.

3:08

Limor was happy and I'm like, this is, you know, I want to help people make beautiful things.

3:14

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.

3:26

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.

3:37

And so it was just a bunch of things came together from the community to make that project happen.

3:42

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?

3:51

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.

4:02

One of my favorite people who's making software on the Commodore and he's making music is Linus Akison.

4:09

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.

4:20

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.

4:28

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.

4:35

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.

4:43

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.

4:53

What were the challenges in bringing JPEG support to CircuitPython?

4:57

If I say it was easy.

5:00

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.

5:08

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.

5:17

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.

5:27

And now I want to put that in a bitmap and show that in some way. That was like a day of work.

5:33

But then after that, it's like, but how do we turn this into something that is useful?

5:39

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.

5:45

Maybe it's bigger than your display, so you're going to scale it or crop it or I don't know.

5:52

So the process of figuring out those things and figuring out what options are we going to support,

5:58

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.

6:07

And then like I said, reading it from a socket or a file, that took a lot longer.

6:11

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.

6:22

And then it will start just being that much more available to use across the range of devices with screens,

6:28

which includes things like the original Pie Portal, the MagTag with the E-Ink display, although I haven't tried that yet.

6:35

It should work. It should be cool.

6:37

And then newer stuff like the Qualia board, which works with all kinds of different displays.

6:42

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.

6:52

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.

6:59

And now that we finally got the stuff to build that camera, it's really, really exciting.

7:04

But yeah, the JPEG decoding is more about, you know, I want to show a picture from the internet on my device,

7:10

and being able to use it to show a picture from your camera on your device is also kind of a serendipitous thing.

7:16

That's great.

7:17

2023 was another busy year with CircuitPython 9 development, Synth.io, JPEG.io, which we just talked about.

7:24

Tell me about the work that you did at the end of the year to add a lot of new fonts to CircuitPython.

7:29

So one of the things, you know, it's always serendipity.

7:32

What did we do that enabled something else?

7:36

And in this case, going back to the Memento camera, it has an autofocus mechanism.

7:42

I'm going to connect this in a minute. Just bear with me.

7:45

It has an autofocus module, and that actually runs a little program in it.

7:51

So there's a firmware that CircuitPython uploads to the camera module that makes the autofocus operate.

7:58

And so we needed to include that firmware file within the library, which is called PyCamera.

8:04

And we didn't have support for that in the bundle builder.

8:08

There was no way to include a binary Python. You could only include Python files.

8:12

And so I did some work, and this ends up like spreading across several things,

8:17

because you have to make sure it works in the bundler, which creates the zip file with all the stuff inside it.

8:21

And then you make sure that CircUp works, and then you make sure that the system that we have on library,

8:26

which I think is called BundleFly, works.

8:28

And that worked fine. That was great.

8:30

Actually, both of those worked, but anyway, a lot of iteration until that worked.

8:34

And then I was thinking, what else do we want to put in libraries?

8:39

And the idea that came to mind was, well, it's kind of a pain to install a font in CircuitPython.

8:44

We don't really have a way to install a font.

8:46

You copy it on, and then you have to write some lines to say what is the path to the font,

8:51

and open the font and get the font object and all this.

8:54

And I had the vision that you would just be able to say from module name import font,

8:58

just like we can say from terminal IO import font, and I wanted it to be that easy.

9:02

And with this thing where we could bundle a bitmap format font within a CircuitPython library

9:10

and install it with CircUp, it's like, this is easy.

9:12

And the other thing that made me think of this is our community member, Naradoc, has put together,

9:19

I'm not going to get the name right, but it is a bundle that is full of keyboard layouts.

9:24

So, like, a key thing that a lot of people do with CircuitPython is they use it to synthesize,

9:30

to create a USB HID device and then do things like send keystrokes.

9:34

And if you want to type a string, like "Hello, Mom," on a keyboard, you need to know the layout of the keyboard.

9:40

On a German keyboard, the key that we label Q has some other letter on it.

9:44

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.

9:49

So, anyway, Naradoc created a bundle with all, or not all, but a great number of world keyboards

9:56

that you can easily install with CircUp.

9:58

So this is the other thing that made me realize we can create a bundle, not by writing each individual library,

10:05

but by creating them with a series of scripts, which is how Naradoc approached the problem.

10:12

And I'm like, we're going to put this idea together.

10:14

We're going to put this idea together.

10:15

And the consequence is now there are a little over 2,000 libraries that you can install.

10:22

And each one is a particular font at a particular point size.

10:25

And then it's either like just the ASCII and Western Europe characters,

10:28

or it's all of the characters included in the font.

10:31

And then, of course, the other thing is people put amazing fonts online for free, you know,

10:36

that anybody can download and use.

10:37

And so it's just putting this, putting things together from all different people

10:41

and then enabling people to use it in their project and actually, yeah, it was really cool.

10:47

I'm really excited about it.

10:48

I'll make sure I link to those in the show notes as well.

10:50

Thank you.

10:51

Last question I ask each guest.

10:53

If you're going to start a new project or prototype, which board do you reach for?

10:57

Well, I mean, the first thing I would do is if you're not totally new to electronics,

11:02

check whether something that you already have runs CircuitPython.

11:04

We've got a couple hundred boards.

11:06

You know, I talked earlier about my experience of starting with like the very cheapest board.

11:11

And I wouldn't quite go to the very cheapest board, but the QDPI ESP32-S3 with 2MB PSRAM,

11:19

I was looking this up, is like $1250.

11:22

It's a cute little board, but you can add a display to it.

11:25

You can add all kinds of sensors to it.

11:27

And just for that getting started, it has a NeoPixel,

11:29

so you can write a Python program to make it show rainbows, which is kind of where everybody starts.

11:33

So go with the QDPI.

11:35

This one I suggest has Wi-Fi, yeah, and you can add a bunch of stuff to it.

11:39

And it was about, I think it was $1250 on the Adafruit store.

11:42

So I think it's a really good choice.

11:44

That's a great pick.

11:45

It has the Stema QT, which makes it easy to add sensors and other stuff to it as well.

11:49

Yeah, and then like the, what is it, there's a display BFF add-on board,

11:55

which lets you put a TFT display and a lot of options to add on to that.

12:00

Jeff, if more people want to learn about you or your work, where should they go?

12:04

So I think probably the best thing to do is you can follow people on GitHub and kind of see what they're doing,

12:10

because I don't necessarily write a lot about what I'm doing, which is mostly work for Adafruit,

12:16

but you can see there, oh, Jeff is working this week on X.

12:19

I am on Mastodon.

12:22

That's not a super technical account.

12:24

We will put that link in the show notes for you.

12:26

And then I have a blog that's very occasionally updated, more with technical stuff,

12:31

but just a handful of posts last year, and that is at unpythonic.net, which has been my domain since 2001.

12:39

Well, that's great.

12:40

Jeff, thanks so much for being on the show.

12:42

All right. Have a good one.

12:44

Thank you for listening.

12:46

Transcripts are available in most podcast players,

12:49

and show notes are available at www.circuitpythonshow.com.

12:54

Until next time, stay positive.

12:57

[ Silence ]