1 00:00:02,420 --> 00:00:04,540 Welcome to the Bootloader, I'm Paul Cutler. 2 00:00:05,300 --> 00:00:06,580 Along with my co-host Tod Kurt, 3 00:00:06,880 --> 00:00:09,800 we were invited to participate in CircuitPython Day 2025 4 00:00:10,000 --> 00:00:10,960 on August 15th, 5 00:00:11,420 --> 00:00:13,480 and we recorded a live episode of the Bootloader. 6 00:00:13,920 --> 00:00:15,500 This is a lightly edited replay, 7 00:00:15,720 --> 00:00:18,000 and you can listen to the episode or watch us on YouTube, 8 00:00:18,260 --> 00:00:19,560 which I've linked to in the show notes. 9 00:00:20,140 --> 00:00:22,120 Now here's Tod and I with some of our favorite things 10 00:00:22,180 --> 00:00:24,760 from CircuitPython and the community from the last year. 11 00:00:26,800 --> 00:00:29,120 Welcome to the Bootloader, I'm Paul Cutler. 12 00:00:29,760 --> 00:00:30,420 And I'm Tod Kurt. 13 00:00:30,900 --> 00:00:33,380 We're coming to you live on the Adafruit YouTube channel 14 00:00:33,480 --> 00:00:34,960 for CircuitPython Day 2025. 15 00:00:35,660 --> 00:00:36,420 If you haven't heard of us, 16 00:00:36,520 --> 00:00:38,500 Paul and I host a podcast called The Bootloader. 17 00:00:39,080 --> 00:00:40,760 Each episode, we bring a few things to share 18 00:00:40,860 --> 00:00:42,200 and chat about for a few minutes each, 19 00:00:42,660 --> 00:00:43,540 no more than about five minutes. 20 00:00:44,080 --> 00:00:45,680 And today we brought you some of our favorite things 21 00:00:45,720 --> 00:00:47,360 that have happened in the CircuitPython community 22 00:00:47,480 --> 00:00:48,120 in the last year. 23 00:00:48,860 --> 00:00:51,220 You can learn more about us at thebootloader.net 24 00:00:51,620 --> 00:00:53,240 or find us wherever you get your podcasts. 25 00:00:54,040 --> 00:00:55,400 And if you wanna chat with us live, 26 00:00:55,480 --> 00:00:57,820 you can find us in the live broadcast chat channel 27 00:00:57,820 --> 00:01:01,940 on the Adafruit Discord at discord.gg/adafruit. 28 00:01:02,940 --> 00:01:05,120 Tod, before we get started, I wanted to take a moment 29 00:01:05,280 --> 00:01:06,800 and give a shout out to Anne Borella. 30 00:01:07,520 --> 00:01:09,400 Anne is the editor of the Python on Hardware 31 00:01:09,580 --> 00:01:11,960 weekly newsletter, and I don't think we could do this show 32 00:01:12,460 --> 00:01:14,660 or my other podcast, The Circuit Python Show 33 00:01:15,040 --> 00:01:16,440 without her and the newsletter. 34 00:01:17,040 --> 00:01:18,800 It's the best way to stay on top of everything 35 00:01:19,020 --> 00:01:20,740 related to Python and hardware. 36 00:01:21,280 --> 00:01:22,980 I had the opportunity a couple of years ago 37 00:01:23,040 --> 00:01:24,920 to help fill in for Anne when she was on vacation 38 00:01:25,100 --> 00:01:27,140 for a couple of weeks, and let me tell you, 39 00:01:27,300 --> 00:01:32,760 It is a ton of work to stay connected in multiple communities and bring you all the news every week. 40 00:01:33,190 --> 00:01:37,500 So go sign up if you haven't and Anne, from us to you, a big thank you. 41 00:01:37,840 --> 00:01:39,720 Yeah, thanks Anne. And it's not just CircuitPython. 42 00:01:39,940 --> 00:01:42,140 It's like pretty much any time you see embedded Python. 43 00:01:42,170 --> 00:01:44,080 It could be on a Raspberry Pi. It could be MicroPython. 44 00:01:44,980 --> 00:01:46,300 Tod, what's your first thing to share? 45 00:01:46,759 --> 00:01:50,420 Alright, so fonts. CircuitPython fonts. 46 00:01:51,410 --> 00:01:53,780 So let me turn it to a little down shooter here. 47 00:01:54,700 --> 00:01:55,640 Not these things, not yet. 48 00:01:55,800 --> 00:02:02,220 this thing. So one of the really cool things about CircuitPython is that it's really easy 49 00:02:02,220 --> 00:02:07,880 to get a display going. This is the little T-Display S3. The underlying Display.io framework 50 00:02:07,940 --> 00:02:12,600 in CircuitPython makes it not matter whether you're using a TFT display like this or an 51 00:02:12,780 --> 00:02:17,240 OLED or ePaper, LED matrix, your display code can really be the same for all these. And 52 00:02:17,260 --> 00:02:25,780 that goes well as well to the fonts. The CircuitPython font system loads these BDF and PCF format 53 00:02:25,780 --> 00:02:27,920 have been around for 30 plus years on Unix systems. 54 00:02:28,080 --> 00:02:29,400 I used to worry about 55 00:02:29,500 --> 00:02:31,660 my bitmap fonts back in the early days of Linux. 56 00:02:32,220 --> 00:02:33,280 There are tools to convert 57 00:02:33,840 --> 00:02:35,880 modern TrueType or OpenType fonts that are like 58 00:02:35,900 --> 00:02:38,300 these scalable vectors to 59 00:02:38,440 --> 00:02:40,500 the old bitmap format if you need to. 60 00:02:41,200 --> 00:02:43,260 There's a great learn guide on 61 00:02:43,300 --> 00:02:45,760 the Adafruit Learn Guide that tells you how to do this. 62 00:02:46,600 --> 00:02:48,460 But doing this conversion is tricky, 63 00:02:48,700 --> 00:02:49,880 it can be a drag at times. 64 00:02:50,730 --> 00:02:52,840 So I was really excited when last year, 65 00:02:53,260 --> 00:02:58,380 there was a effort by Jeff Epler to make a package, 66 00:02:58,740 --> 00:03:01,980 a bundle of a bunch of pre-converted fonts. 67 00:03:03,640 --> 00:03:05,420 The really cool thing is that 68 00:03:06,020 --> 00:03:09,240 the bundle is set up such that you can use it with CircUp. 69 00:03:10,120 --> 00:03:11,400 So all you have to do is, 70 00:03:12,180 --> 00:03:13,280 the instructions are in the repo, 71 00:03:13,880 --> 00:03:16,000 you just add this bundle to your CircUp setup. 72 00:03:16,140 --> 00:03:17,640 By the way, CircUp, if you've not used it, 73 00:03:17,680 --> 00:03:20,220 it's like PIP for CircuitPython, 74 00:03:20,280 --> 00:03:23,200 a package manager for CircuitPython, really handy. 75 00:03:23,440 --> 00:03:28,100 If you're using the CircuitPython plugin for VS Code, 76 00:03:28,100 --> 00:03:30,220 I believe it also works the same way. 77 00:03:30,960 --> 00:03:33,620 But once you have the bundle installed to Circup, 78 00:03:33,620 --> 00:03:35,460 you can say Circup install font, 79 00:03:35,960 --> 00:03:38,280 font name, whatever of the many fonts. 80 00:03:38,400 --> 00:03:41,240 If you look in the number of fonts that's in this repo, 81 00:03:42,320 --> 00:03:44,760 there are hundreds. 82 00:03:46,520 --> 00:03:47,560 They're stored as true type, 83 00:03:47,660 --> 00:03:50,200 so you could learn how the conversion process works, 84 00:03:50,240 --> 00:03:51,820 by looking at this repo as well, which is pretty cool. 85 00:03:53,140 --> 00:03:55,060 This little demo I have in the bottom right 86 00:03:55,160 --> 00:03:57,600 is showing me loading a bunch of fonts. 87 00:03:57,700 --> 00:04:00,040 What that code looks like, it's really simple. 88 00:04:00,620 --> 00:04:02,600 I'll show you using my favorite terminal program, 89 00:04:03,360 --> 00:04:04,880 or my favorite text program, Emacs. 90 00:04:05,320 --> 00:04:07,800 You circ up install a bunch of fonts, 91 00:04:08,280 --> 00:04:09,060 like whichever font you want. 92 00:04:09,080 --> 00:04:10,460 In this case, I'm installing all these fonts. 93 00:04:11,200 --> 00:04:12,520 Then in your code, 94 00:04:12,740 --> 00:04:14,800 you just load them like Python packages, 95 00:04:15,480 --> 00:04:16,299 which is pretty nice. 96 00:04:16,799 --> 00:04:18,000 Then you can do whatever you want. 97 00:04:18,160 --> 00:04:19,400 In this case, I've made 98 00:04:19,280 --> 00:04:20,440 a little list of all the packages, 99 00:04:20,620 --> 00:04:21,940 and I'm just going through this list 100 00:04:22,290 --> 00:04:24,600 to display the fonts with various colors. 101 00:04:25,390 --> 00:04:26,380 And that's what the rest of this code is. 102 00:04:26,580 --> 00:04:27,180 It's not very exciting. 103 00:04:27,180 --> 00:04:29,860 It's basically just standard display IO stuff. 104 00:04:30,230 --> 00:04:31,840 It does also obey the buttons 105 00:04:32,170 --> 00:04:34,060 so I can speed up or reverse the scrolling. 106 00:04:34,540 --> 00:04:35,540 Oops, except I can't go that way 107 00:04:35,640 --> 00:04:36,840 'cause I haven't actually fixed that part. 108 00:04:37,680 --> 00:04:38,040 (laughs) 109 00:04:38,800 --> 00:04:40,140 So yeah, we can scroll really fast. 110 00:04:40,940 --> 00:04:42,400 And some of these fonts are really great. 111 00:04:42,460 --> 00:04:44,380 Like you get some really pro-looking results, 112 00:04:45,140 --> 00:04:46,680 but just by having a really good font. 113 00:04:47,080 --> 00:04:48,360 So it's really cool. 114 00:04:48,500 --> 00:04:51,640 I really love this the CircuitPython fonts package. I've been using it for some of my things. 115 00:04:52,200 --> 00:04:57,640 By the way, if you want a good CircuitPython board that has a beautiful display, this T-Display S3 is really nice. 116 00:04:59,660 --> 00:05:02,420 Let me make it a little bit bigger. And this is pretty cheap, but it runs, 117 00:05:02,540 --> 00:05:08,400 it's an ESP32 S3 that can do Wi-Fi and stuff like that. But anyway, that's the CircuitPython 118 00:05:09,400 --> 00:05:12,600 font package. Try it out if you have to do anything with displays. 119 00:05:14,180 --> 00:05:20,440 So when you're installing that via circup, how do you decide what size fonts to install or to try first? 120 00:05:20,960 --> 00:05:23,220 Whoo. Yeah, that's a good that's a good point 121 00:05:23,820 --> 00:05:27,560 Like in this case, I'm doing a big demo and I just wanted the biggest fonts possible 122 00:05:27,660 --> 00:05:34,300 So I chose size 48 and I didn't I haven't figured out if 48 means 48 points or 48 pixels high 123 00:05:34,600 --> 00:05:38,940 Oops, I think it means 48 pixels high just from the resolution of the screen, but I'm not sure 124 00:05:38,950 --> 00:05:44,160 So it's one of the things that he'd look at he's he's pre created a bunch of different common sizes 125 00:05:44,160 --> 00:05:48,040 12, 24, 36, 48, eight for really small display, 126 00:05:49,800 --> 00:05:51,860 like status display type of fonts. 127 00:05:52,760 --> 00:05:57,720 But this is what 48 looks like on a 320 by 240 display, 128 00:05:57,820 --> 00:05:58,180 I think. 129 00:05:58,820 --> 00:05:59,080 Sure. 130 00:05:59,660 --> 00:06:01,000 I forget what the resolution is of this one, 131 00:06:01,120 --> 00:06:02,580 it's nice, oh actually maybe it says on the box. 132 00:06:03,880 --> 00:06:04,060 Nope. 133 00:06:05,900 --> 00:06:08,960 Anyway, I'll put a link to this gizmo, 134 00:06:09,780 --> 00:06:11,520 they've got a pretty good wiki about it, 135 00:06:12,140 --> 00:06:17,660 And I'll put a link to my code in the show notes or the Discord. 136 00:06:19,160 --> 00:06:24,200 But yeah, so it kind of depends on the kind of the information you're wanting to display. If it's something big and big and 137 00:06:25,080 --> 00:06:31,680 label-y like this to be seen across the room, then a 48 size is pretty good. For the CircuitPython REPL, 138 00:06:32,600 --> 00:06:34,140 which I can show that real quick here. 139 00:06:36,000 --> 00:06:37,040 If we go into the REPL. 140 00:06:38,080 --> 00:06:41,840 So I think that's a size 8 font. So you can get a lot of information on the screen, 141 00:06:41,840 --> 00:06:44,000 but it's really hard to read from across the room. 142 00:06:44,760 --> 00:06:46,380 So pick your poison. 143 00:06:46,580 --> 00:06:48,140 What works for your particular application, 144 00:06:48,320 --> 00:06:49,900 I think is the real answer. 145 00:06:50,680 --> 00:06:52,120 >> Sure. Makes sense. 146 00:06:53,419 --> 00:06:56,380 >> All right. So what do you have for us this time? 147 00:06:57,380 --> 00:06:58,440 >> Late last November, 148 00:06:58,940 --> 00:07:01,320 Will Merkins released version 0.2 149 00:07:01,540 --> 00:07:03,760 of the CircuitPython extension for VS Code. 150 00:07:04,520 --> 00:07:06,920 This is a fork of the original extension by Joe DeVivo, 151 00:07:07,040 --> 00:07:09,160 which hadn't been updated since late 2023. 152 00:07:09,800 --> 00:07:14,140 A thank you to Joe DeVivo for creating this extension and licensing it under the MIT license. 153 00:07:14,820 --> 00:07:18,180 That allowed Will Merkins to fork it, and a big shout out for taking this on. 154 00:07:18,720 --> 00:07:22,860 It's never easy to fork someone's project, figure out someone else's code, and then add 155 00:07:22,980 --> 00:07:23,320 to it. 156 00:07:23,880 --> 00:07:27,720 And every time CircuitPython has had a major release, the extension has been updated. 157 00:07:28,500 --> 00:07:32,220 If you're a VS Code user, you can install the extension by going to View Extensions 158 00:07:32,270 --> 00:07:33,620 and search for CircuitPython. 159 00:07:34,140 --> 00:07:35,220 Let me bring up VS Code. 160 00:07:36,360 --> 00:07:39,300 You can click on the extensions, type CircuitPython, 161 00:07:40,210 --> 00:07:43,060 and you'll see that it comes up with the V2 and the original. 162 00:07:43,140 --> 00:07:46,020 Make sure that you choose the V2, which I have installed. 163 00:07:46,690 --> 00:07:47,780 Once you have it installed, 164 00:07:48,420 --> 00:07:52,020 all you need to do is open your directory, 165 00:07:53,440 --> 00:07:56,200 open a folder that contains your CircuitPy drive, 166 00:07:56,700 --> 00:07:59,840 and the extension will automatically kick in. 167 00:08:01,020 --> 00:08:03,280 Oh, that's all you do is just open up 168 00:08:03,280 --> 00:08:05,900 the whole CircuitPy drive as a folder in VS Code. 169 00:08:06,330 --> 00:08:06,960 I haven't used it yet. 170 00:08:06,960 --> 00:08:09,820 >> That's all you do. It sees that if it's 171 00:08:10,000 --> 00:08:12,340 main.py or code.py or a couple others, 172 00:08:12,520 --> 00:08:14,200 it automatically enables the extension. 173 00:08:15,080 --> 00:08:16,840 So from there, you want to choose a board, 174 00:08:17,850 --> 00:08:19,640 and I've got a couple of boards plugged in, 175 00:08:19,800 --> 00:08:22,060 but one board that I'm using right now is 176 00:08:22,200 --> 00:08:24,500 the seed.jow.senseboard. 177 00:08:25,380 --> 00:08:26,640 Once you have that selected, 178 00:08:28,040 --> 00:08:30,680 you can do fun things like auto-completes. 179 00:08:30,800 --> 00:08:32,400 So here's the pins, the charge rate, 180 00:08:32,479 --> 00:08:33,380 the charge status. 181 00:08:33,870 --> 00:08:35,640 I bet there's a microphone one in here somewhere. 182 00:08:35,729 --> 00:08:38,060 If I'm, yep, there's the mic power. 183 00:08:38,700 --> 00:08:40,159 So all of that auto-complete, 184 00:08:40,320 --> 00:08:41,700 what you would expect in an IDE 185 00:08:42,520 --> 00:08:44,039 comes to life through this extension. 186 00:08:44,560 --> 00:08:45,140 That's cool. 187 00:08:45,820 --> 00:08:47,400 Now, if you bring up the command palette 188 00:08:47,480 --> 00:08:48,640 with shift command P 189 00:08:49,480 --> 00:08:51,520 and then type circuit Python as well, 190 00:08:51,620 --> 00:08:53,020 you can see all the different commands 191 00:08:53,080 --> 00:08:54,080 that are available to you. 192 00:08:54,620 --> 00:08:56,280 So you can show available libraries. 193 00:08:57,660 --> 00:08:59,840 That shows all libraries that are installable. 194 00:09:00,300 --> 00:09:01,599 You can list the project libraries 195 00:09:01,600 --> 00:09:03,520 that you have installed on your device, 196 00:09:04,090 --> 00:09:06,960 it automatically downloads and checks for the latest bundle 197 00:09:07,080 --> 00:09:09,980 that of libraries when you first install the extension 198 00:09:10,170 --> 00:09:12,000 and every time you open VS Code as well. 199 00:09:12,580 --> 00:09:13,840 You can choose the board, 200 00:09:14,320 --> 00:09:15,720 you can mess with the serial monitor, 201 00:09:16,340 --> 00:09:18,560 and you can update all libraries, 202 00:09:18,660 --> 00:09:20,140 which is probably one of my favorite things. 203 00:09:20,180 --> 00:09:23,780 This was inspired by the circup update --all command, 204 00:09:24,160 --> 00:09:26,080 but this works just for the VS Code extension. 205 00:09:26,690 --> 00:09:27,660 >>Yeah, that's really handy 206 00:09:27,860 --> 00:09:29,439 'cause right now we're at this cusp 207 00:09:29,440 --> 00:09:33,860 between CircuitPython 9 being the regular official version, 208 00:09:33,960 --> 00:09:37,260 CircuitPython 10, and the library file format changes 209 00:09:37,440 --> 00:09:38,800 between big versions like that. 210 00:09:38,940 --> 00:09:41,600 So we're going to have to update our library soon 211 00:09:41,940 --> 00:09:43,960 if you're not already playing with version 10. 212 00:09:44,660 --> 00:09:46,160 And then the other thing you can do 213 00:09:46,300 --> 00:09:48,220 is it's really easy to open the serial monitor. 214 00:09:48,290 --> 00:09:49,320 You just hit the little button 215 00:09:49,360 --> 00:09:50,460 in the bottom right-hand corner. 216 00:09:51,440 --> 00:09:54,740 You can see that I have a couple different boards plugged in. 217 00:09:55,839 --> 00:09:57,080 Oh, doesn't like that. 218 00:09:57,120 --> 00:09:58,560 I don't know why that board isn't working. 219 00:09:58,760 --> 00:10:00,700 Of course, doing it live, something's got to go wrong. 220 00:10:01,230 --> 00:10:01,680 >> Live demo. 221 00:10:02,570 --> 00:10:03,260 >> Exactly. 222 00:10:03,960 --> 00:10:06,600 But that's the CircuitPython v2 extension for VS Code. 223 00:10:07,140 --> 00:10:09,340 A big shout out to Will Markins for bringing it back 224 00:10:09,340 --> 00:10:10,980 and keeping it updated this past year. 225 00:10:11,440 --> 00:10:12,900 And if VS Code isn't your thing, 226 00:10:13,420 --> 00:10:15,260 check out Professor Gallagher's YouTube channel 227 00:10:15,400 --> 00:10:17,660 for a great guide on setting up PyCharm and TO 228 00:10:17,760 --> 00:10:18,880 as an alternative as well. 229 00:10:19,190 --> 00:10:19,580 >> Totally. 230 00:10:20,150 --> 00:10:24,440 Yeah, so how do you change the different board types? 231 00:10:24,640 --> 00:10:26,400 Because I use a bunch of different CircuitPython boards. 232 00:10:26,620 --> 00:10:28,040 Like I think you covered it quickly, 233 00:10:28,120 --> 00:10:29,260 but I kind of missed it. 234 00:10:29,260 --> 00:10:31,560 What was the, like, where do you go 235 00:10:31,620 --> 00:10:34,480 and select which board kind you're using? 236 00:10:35,120 --> 00:10:36,720 If you haven't chosen a board yet 237 00:10:36,820 --> 00:10:41,520 where it says CXO and NRF 52.840 cents here 238 00:10:41,800 --> 00:10:43,020 would say choose board. 239 00:10:43,300 --> 00:10:43,760 Oh, wow, okay. 240 00:10:43,840 --> 00:10:46,820 So you'd click that and then you can scroll through 241 00:10:47,180 --> 00:10:49,260 and you'll see every board that has had a release 242 00:10:49,300 --> 00:10:50,800 on circuitpython.org. 243 00:10:51,320 --> 00:10:52,240 Okay, I see, yeah. 244 00:10:52,940 --> 00:10:57,140 So the extension's only up to using CircuitPython 9.2.x. 245 00:10:57,280 --> 00:10:58,880 that doesn't include the 10.0 betas. 246 00:10:58,880 --> 00:11:00,160 It only has the full releases. 247 00:11:00,740 --> 00:11:02,840 So for example, the fruit jam won't be in there 248 00:11:03,120 --> 00:11:05,560 until the 10.0 final comes out 249 00:11:05,660 --> 00:11:07,320 and the extension is updated with that. 250 00:11:07,660 --> 00:11:09,900 And then it will pull in all the latest boards as well. 251 00:11:10,320 --> 00:11:11,420 Yeah. Okay. 252 00:11:11,620 --> 00:11:12,100 That's pretty cool. 253 00:11:13,319 --> 00:11:17,000 That was the main thing that stymied me when I tried it. 254 00:11:17,000 --> 00:11:18,440 And I might've been trying the version one. 255 00:11:18,760 --> 00:11:20,720 I just could not get like, how do we select the board? 256 00:11:22,240 --> 00:11:24,200 Yup. And it's one of the more popular questions 257 00:11:24,200 --> 00:11:26,300 in the Discord is which IDE should I use? 258 00:11:26,840 --> 00:11:30,940 With mu being sunset this year. It's nice to see that someone in the community 259 00:11:31,680 --> 00:11:37,700 Stood up took this on and shared it with everyone. So it's just great to have another alternative out there as well. No kidding 260 00:11:38,780 --> 00:11:42,460 All right. What's your next one for us Tod? I'm getting my I get my demo ready here 261 00:11:42,840 --> 00:11:46,840 Um, see if it comes up. All right, so this is a fruit jam product project 262 00:11:48,140 --> 00:11:52,160 So the fruit jam, it's like a little computer. It's got video out. It's got 263 00:11:53,000 --> 00:11:54,679 keyboard and mouse in basically 264 00:11:54,920 --> 00:11:56,780 You really want to treat it like a little computer 265 00:11:57,820 --> 00:12:01,920 But man doing doing all this what the free gem does is is it's kind of hard 266 00:12:02,380 --> 00:12:06,880 especially acting as a USB host like one of the things that USB does did is it put a lot of the 267 00:12:07,520 --> 00:12:13,480 processing of the USB protocol on the computer side of things rather than the peripheral side of things so that your your mouse can be 268 00:12:13,710 --> 00:12:14,700 You know pretty pretty dumb 269 00:12:15,360 --> 00:12:19,540 but it means that now we have the free gem means the free gem has to do a lot of work on the USB side to 270 00:12:19,720 --> 00:12:22,520 Pretend to be a computer to the to the whatever things you plug into it 271 00:12:23,240 --> 00:12:30,460 So I was really gratified to see that Sam Blenny on the Adafruit playground site has been doing some really cool stuff with USB host 272 00:12:30,580 --> 00:12:35,660 specifically USB MIDI since I'm a real USB MIDI person. One of the 273 00:12:36,680 --> 00:12:41,200 things he made is this USB host MIDI tester 274 00:12:41,900 --> 00:12:46,260 and so the way it works is you've got a little display of notes here and 275 00:12:48,240 --> 00:12:50,720 and the vertical axis is MIDI channel, 276 00:12:50,920 --> 00:12:52,340 and then this is like a little status area 277 00:12:52,440 --> 00:12:54,000 for like if your thing got plugged in or not. 278 00:12:54,310 --> 00:12:57,520 And so I have a lot of these little cheap 279 00:12:57,860 --> 00:12:59,560 USB MIDI controllers, which are great, 280 00:12:59,760 --> 00:13:00,860 except they're USB only. 281 00:13:01,860 --> 00:13:02,960 You can find these, they're so cheap, 282 00:13:03,000 --> 00:13:04,260 they're like 20, 30 bucks, 283 00:13:04,820 --> 00:13:06,500 but because they're just USB, 284 00:13:07,660 --> 00:13:09,800 because they're just USB MIDI and not just MIDI MIDI, 285 00:13:10,380 --> 00:13:11,720 it's really hard to use with some of my stuff. 286 00:13:12,220 --> 00:13:13,900 But thankfully, we're getting to the point now 287 00:13:13,960 --> 00:13:16,220 where we can have microcontrollers that do USB host. 288 00:13:16,360 --> 00:13:18,480 And so here's one of Sam's, 289 00:13:19,140 --> 00:13:21,460 here's a demo of Sam's little project working, 290 00:13:21,960 --> 00:13:23,520 where if I plug in the device, 291 00:13:24,170 --> 00:13:25,240 you should see the scanning. 292 00:13:25,420 --> 00:13:26,560 Ah, look, it recognized it. 293 00:13:27,040 --> 00:13:28,800 And if I start playing on the keyboard, 294 00:13:30,280 --> 00:13:32,180 you'll see the little lights on the display figure. 295 00:13:32,330 --> 00:13:33,560 And this is an HDMI monitor, right? 296 00:13:33,660 --> 00:13:36,120 So like I'm basically being a full computer here, 297 00:13:37,480 --> 00:13:41,320 but it's a special purpose MIDI computer. 298 00:13:41,330 --> 00:13:43,460 And so if I turn it off and turn it back on again, 299 00:13:43,470 --> 00:13:44,959 it actually comes up much faster 300 00:13:44,960 --> 00:13:47,840 a computer would come up, like boom, there, it's running again. 301 00:13:47,880 --> 00:13:57,360 You know, now one of the downsides of the current way that USB host works on Circuit 302 00:13:57,440 --> 00:14:02,440 Python, by the way, this is all Circuit Python, which is just amazing, is it doesn't do device 303 00:14:02,720 --> 00:14:04,320 removal detection very well. 304 00:14:04,780 --> 00:14:10,520 Like you saw it detected immediately the USB device plug-in, but if I plug in something 305 00:14:10,760 --> 00:14:12,540 else, it also does not necessarily do that. 306 00:14:12,640 --> 00:14:16,540 It's like there's a ghost of the previous connection hiding 307 00:14:17,100 --> 00:14:18,800 in the system and so this doesn't quite work. 308 00:14:19,140 --> 00:14:21,100 But you know, right now you can just reset 309 00:14:22,820 --> 00:14:25,100 and just in two seconds, it comes back up 310 00:14:25,420 --> 00:14:26,600 and now the new device is detected. 311 00:14:27,140 --> 00:14:28,060 And so this is, I think, is what I said, 312 00:14:28,100 --> 00:14:31,040 it's gonna be fixed as things get more and more developed. 313 00:14:31,760 --> 00:14:33,040 This has been one of the first real, 314 00:14:33,560 --> 00:14:35,040 the FreeJams have been one of the first real 315 00:14:36,060 --> 00:14:37,800 good things to play with USB. 316 00:14:37,940 --> 00:14:39,460 And so I think we're gonna see USB hosts get better 317 00:14:39,460 --> 00:14:40,280 and better really quickly. 318 00:14:41,420 --> 00:14:43,560 This is really exciting because now this is a path 319 00:14:43,720 --> 00:14:46,860 towards making all these random little MIDI keyboards 320 00:14:46,860 --> 00:14:49,280 I have that are just USB and you do something better. 321 00:14:51,580 --> 00:14:54,720 Oh, and also I wanted to give a shout out 322 00:14:54,880 --> 00:14:59,680 to Sam's Adafruit Playground page in general 323 00:14:59,680 --> 00:15:01,660 'cause there's a lot of really good stuff there 324 00:15:02,320 --> 00:15:05,580 for learning just techniques in CircuitPython 325 00:15:05,900 --> 00:15:07,640 and he's just publishing all the details. 326 00:15:07,920 --> 00:15:11,400 For instance, his somewhere way down here 327 00:15:11,400 --> 00:15:12,920 is the Fruit Jam MIDI tester, 328 00:15:13,040 --> 00:15:14,320 but he published this months ago. 329 00:15:15,000 --> 00:15:19,160 Since then, he's made this full portable MIDI synth. 330 00:15:19,300 --> 00:15:20,160 It runs off a battery, 331 00:15:20,420 --> 00:15:22,380 uses the Fruit Jam and a USB MIDI keyboard. 332 00:15:22,960 --> 00:15:25,080 So you could put in your backpack, go play somewhere. 333 00:15:25,860 --> 00:15:30,260 One of the other really useful things is here's a gamepad tester. 334 00:15:30,300 --> 00:15:31,880 So it's like two USB gamepads. 335 00:15:32,460 --> 00:15:33,440 I think Adafruit sells some. 336 00:15:34,440 --> 00:15:36,120 So this helps you test out, 337 00:15:36,220 --> 00:15:38,020 do these gamepads actually work with the Fruit Jam. 338 00:15:38,420 --> 00:15:41,320 So yeah, thank you, Sam, for doing all this great work. 339 00:15:41,640 --> 00:15:45,580 I can't wait to play more with the Fruit Jam with some of the USB host stuff. 340 00:15:46,240 --> 00:15:49,740 That's a great segue because I know Sam helped out on my next pick. 341 00:15:50,320 --> 00:15:50,720 Oh yeah. 342 00:15:52,180 --> 00:15:57,420 So my, we'll just jump into it. My next pick might suffer from some recency bias just like yours, 343 00:15:57,900 --> 00:16:00,000 but it's just so cool I have to talk about it. 344 00:16:00,440 --> 00:16:04,000 It's so new that it hasn't even been in the Python on Hardware newsletter yet, 345 00:16:04,440 --> 00:16:06,400 though it was demoed on Show & Tell this week. 346 00:16:06,420 --> 00:16:11,120 And that is Fruitress, a Tetris clone for the fruit jam that is running over my shoulder 347 00:16:11,200 --> 00:16:13,660 on my fruit jam on my extra monitor on my workbench. 348 00:16:14,480 --> 00:16:18,660 The fruit jam has only been out for just two weeks, and already a community member, Cooper 349 00:16:20,799 --> 00:16:22,820 Dalrymple has created a Tetris clone. 350 00:16:23,840 --> 00:16:27,060 I got to know Cooper earlier this year when he was a guest twice on the CircuitPython 351 00:16:27,260 --> 00:16:29,700 show, and you might know of him from his work with Synth.io. 352 00:16:30,540 --> 00:16:35,220 Fruitress has already had four releases this week and is still considered alpha, but I 353 00:16:35,220 --> 00:16:39,940 run into any bugs and no I'm not going to admit to how much time I've played this week when I 354 00:16:40,180 --> 00:16:44,920 probably should have been prepping for the show. There's a few different things that are really 355 00:16:45,120 --> 00:16:50,220 neat about Fruitress. First, Cooper did some work to detect the display and it now supports 356 00:16:50,520 --> 00:16:54,780 widescreen displays and the resolutions and the gameplay region adjusts depending on your 357 00:16:54,960 --> 00:17:05,199 resolution. Second, the music is fantastic. Plug in some headphones. It's perfect and retro in an 358 00:17:05,199 --> 00:17:07,699 to update synth.io and add a tempo variable, 359 00:17:08,260 --> 00:17:10,720 which he puts to good use in Fruitress 360 00:17:10,760 --> 00:17:13,740 as the music speeds up as the levels get harder and faster. 361 00:17:14,400 --> 00:17:16,959 Third, you can use a game pad or mouse 362 00:17:16,959 --> 00:17:18,439 to rotate and drop the bricks. 363 00:17:18,920 --> 00:17:20,260 You can find the keyboard shortcuts 364 00:17:20,319 --> 00:17:22,199 on the project's Adafruit Playground page, 365 00:17:22,839 --> 00:17:24,000 which I have up right here. 366 00:17:25,319 --> 00:17:28,160 So he's got a great page that shows everything 367 00:17:28,180 --> 00:17:29,540 you need to know about the game, 368 00:17:29,800 --> 00:17:32,060 what it's running on, a video demo. 369 00:17:33,280 --> 00:17:35,940 Here's the controls, how to configure the display 370 00:17:36,280 --> 00:17:38,440 and the NeoPixels, what parts to use, 371 00:17:38,600 --> 00:17:41,080 and then about 1600 lines of code. 372 00:17:41,660 --> 00:17:42,060 (laughing) 373 00:17:42,800 --> 00:17:45,200 Yeah, it is a full application. 374 00:17:46,340 --> 00:17:47,120 Yup, yup. 375 00:17:47,320 --> 00:17:49,480 It's not for the faint of heart, 376 00:17:50,000 --> 00:17:52,860 but he makes excellent use of async IO in here. 377 00:17:53,460 --> 00:17:54,480 One of the questions I was asked 378 00:17:54,480 --> 00:17:57,080 when I told someone I was playing was if the game was laggy 379 00:17:57,180 --> 00:17:59,080 because I was running a game on a microcontroller. 380 00:17:59,600 --> 00:18:01,440 And no, it's not, not at all. 381 00:18:02,000 --> 00:18:03,960 from the graphics to the sounds to the gameplay, 382 00:18:04,220 --> 00:18:05,300 it's really well done. 383 00:18:06,020 --> 00:18:07,120 If and when you get a Fruit Jam, 384 00:18:07,140 --> 00:18:09,260 make this one of the first things that you install. 385 00:18:09,980 --> 00:18:10,220 Totally. 386 00:18:10,620 --> 00:18:12,640 Yeah, we've seen a lot of, 387 00:18:13,460 --> 00:18:15,360 like ever since Arduino could drive displays, 388 00:18:15,520 --> 00:18:17,680 we've seen people implement little video games, 389 00:18:17,940 --> 00:18:19,800 like old ladies video games, like Tetris, whatever. 390 00:18:20,440 --> 00:18:24,440 But this is running, it's driving a display. 391 00:18:24,700 --> 00:18:27,520 It's using a USB keyboard or game pad as input, 392 00:18:27,920 --> 00:18:28,920 and it's all written in CircuitPython. 393 00:18:30,300 --> 00:18:30,740 (laughs) 394 00:18:30,880 --> 00:18:31,560 Just the levels of complexity. 395 00:18:31,560 --> 00:18:33,340 We've reached the vision that Scott has talked about 396 00:18:33,340 --> 00:18:34,280 for years, right? 397 00:18:34,300 --> 00:18:35,460 It's just like the old days. 398 00:18:35,520 --> 00:18:36,660 You can plug and play. 399 00:18:36,660 --> 00:18:38,380 You plug it into the display like you said earlier, 400 00:18:38,800 --> 00:18:39,840 and it instant turns on. 401 00:18:40,200 --> 00:18:41,700 And then here we've got a game console. 402 00:18:42,220 --> 00:18:43,600 We've got Fruit Jam OS coming 403 00:18:43,700 --> 00:18:45,180 where you can have multiple different apps 404 00:18:45,360 --> 00:18:46,340 installed at the same time. 405 00:18:46,680 --> 00:18:48,980 It's a really exciting time for CircuitPython. 406 00:18:49,720 --> 00:18:50,780 Yeah, one of the cool things, 407 00:18:50,820 --> 00:18:53,480 it's a really good, as someone who's a Synthio fan, 408 00:18:53,760 --> 00:18:55,920 one of the cool things is to, if you're into Synthio, 409 00:18:56,000 --> 00:18:58,540 you should look into how he does the music 410 00:18:58,540 --> 00:19:01,700 because it really shows the power of what you can do 411 00:19:01,780 --> 00:19:03,180 with music synthesis in CircuitPython 412 00:19:03,250 --> 00:19:05,520 because he sets up these little synthesizers, 413 00:19:06,980 --> 00:19:08,400 little Synth.io synthesizers, 414 00:19:08,800 --> 00:19:11,700 and then he has these just standard MIDI files, 415 00:19:12,120 --> 00:19:13,060 and he tells Synth.io, 416 00:19:13,290 --> 00:19:16,700 "Hey, Synth.io, play this MIDI file with this synthesizer." 417 00:19:16,700 --> 00:19:19,600 And so, and you can do that with multiple synthesizers 418 00:19:19,700 --> 00:19:20,460 and multiple MIDI tracks, 419 00:19:20,540 --> 00:19:21,900 so that's how he gets the interesting, 420 00:19:22,320 --> 00:19:23,340 nice sound out of it. 421 00:19:24,000 --> 00:19:25,540 And yeah, it's just like, cool, 422 00:19:25,660 --> 00:19:26,860 that's just something you can do 423 00:19:26,860 --> 00:19:27,900 a couple lines of CircuitPython. 424 00:19:29,020 --> 00:19:32,440 Yep. And he put together a whole game in just a matter of weeks. 425 00:19:32,560 --> 00:19:34,000 It's just amazing. Yeah. 426 00:19:35,320 --> 00:19:36,500 What's your next pick for us? 427 00:19:37,010 --> 00:19:40,960 All right. So do you know that there are four, at least four different ways 428 00:19:41,040 --> 00:19:42,380 to program your CircuitPython devices? 429 00:19:43,420 --> 00:19:45,560 I'm sure you're aware of the one of the original differences 430 00:19:45,760 --> 00:19:48,080 between CircuitPython and MicroPython. 431 00:19:48,460 --> 00:19:51,160 CircuitPython only supported devices with native USB. 432 00:19:51,650 --> 00:19:55,360 That means devices that could emulate a USB storage device, USB thumb drive 433 00:19:55,660 --> 00:19:57,400 and provide us with a CircuitPy drive 434 00:19:57,670 --> 00:19:59,760 that we'd normally save our code.py file on. 435 00:20:00,140 --> 00:20:01,920 This restriction is really good though, 436 00:20:02,140 --> 00:20:04,820 because with just a text editor and the terminal program, 437 00:20:05,090 --> 00:20:06,480 you can write CircuitPython programs. 438 00:20:06,740 --> 00:20:11,080 Got an old Windows 95 laptop with notepad.exe and putty, 439 00:20:11,500 --> 00:20:13,300 you can code on a CircuitPython board. 440 00:20:14,040 --> 00:20:16,280 And this is actually not too much different than my setup, 441 00:20:16,380 --> 00:20:18,020 which I use TO and Emacs, 442 00:20:18,120 --> 00:20:20,760 but I'm not yet into the IDE space. 443 00:20:21,380 --> 00:20:24,620 But if you wanna do other ways, 444 00:20:24,740 --> 00:20:25,980 If you only use other chips, 445 00:20:26,440 --> 00:20:27,320 it used to not be possible, 446 00:20:27,460 --> 00:20:30,920 but now there's all these CircuitPython capable boards 447 00:20:31,420 --> 00:20:33,880 that don't have native USB, so how do they work? 448 00:20:34,460 --> 00:20:37,520 So for the ESP32, the old original ESP32 devices, 449 00:20:37,940 --> 00:20:39,960 there's the web workflow where it starts up 450 00:20:40,000 --> 00:20:43,620 a little entire web server with file transfer capability 451 00:20:43,620 --> 00:20:44,580 and serial emulation. 452 00:20:45,220 --> 00:20:48,440 It's pretty amazing, but it does take some CPU resources 453 00:20:48,620 --> 00:20:49,320 that maybe you want, 454 00:20:49,700 --> 00:20:50,900 'cause it is just a little microcontroller. 455 00:20:52,960 --> 00:20:55,920 Also, the Wi-Fi reception on 456 00:20:56,060 --> 00:20:58,400 these little boards is usually not that great compared to 457 00:20:58,440 --> 00:21:01,460 what we're expecting from our laptops and stuff. 458 00:21:01,460 --> 00:21:04,320 So trying to edit files can get a little frustrating. 459 00:21:05,080 --> 00:21:06,860 So I actually have the web workflow stuff 460 00:21:06,940 --> 00:21:07,940 turned off just because I'm like, 461 00:21:08,010 --> 00:21:09,260 I'll figure out some other purpose. 462 00:21:09,620 --> 00:21:11,040 Sorry, I figured out some other way and there's 463 00:21:11,080 --> 00:21:12,480 like some command line tools you can use, 464 00:21:12,940 --> 00:21:14,040 but it's fiddly. 465 00:21:14,840 --> 00:21:16,340 There's also a BLE workflow 466 00:21:17,500 --> 00:21:20,000 for the InterF52 Bluetooth-based devices. 467 00:21:20,320 --> 00:21:21,840 That's pretty cool. It means you can use 468 00:21:21,840 --> 00:21:24,140 potentially to use to edit CircuitPython. 469 00:21:24,600 --> 00:21:25,440 I've not tried that much. 470 00:21:26,370 --> 00:21:30,180 I have used the serial part of 471 00:21:30,290 --> 00:21:32,920 Bluetooth to play with CircuitPython devices, 472 00:21:32,920 --> 00:21:35,160 but that's about it. But both of these are wireless. 473 00:21:37,760 --> 00:21:39,720 If your connection isn't perfect, it can be frustrating. 474 00:21:40,700 --> 00:21:43,140 But now there is a way to do 475 00:21:43,540 --> 00:21:48,039 native USB saving and loading of files and editing 476 00:21:48,040 --> 00:21:52,520 code on things like on originally ESP32 devices. 477 00:21:53,340 --> 00:21:54,960 This is like the way Thonny works with 478 00:21:55,180 --> 00:21:56,760 MicroPython if you ever use that, 479 00:21:57,070 --> 00:21:59,580 where you have to use the special program to talk 480 00:21:59,700 --> 00:22:03,160 to the file system that's somewhere hidden on the device. 481 00:22:03,800 --> 00:22:06,800 But the code.circuitpython.org 482 00:22:07,380 --> 00:22:11,600 web-based editor does this now too, and it works great. 483 00:22:11,780 --> 00:22:15,600 If you use one of the new Sparkle Motion 484 00:22:15,600 --> 00:22:19,080 LED driver boards like this one here, 485 00:22:20,280 --> 00:22:23,060 you can now edit the code files on this pretty easily. 486 00:22:23,900 --> 00:22:25,520 This is all running CircuitPython. 487 00:22:25,640 --> 00:22:26,520 Where's my little piece of paper? 488 00:22:26,820 --> 00:22:29,640 It's a diffuser. This is all in CircuitPython. 489 00:22:29,820 --> 00:22:32,920 The way this works is in the browser, 490 00:22:33,590 --> 00:22:35,220 you see now there are these three. 491 00:22:36,120 --> 00:22:38,580 I'm seeing these three options because currently there's 492 00:22:38,660 --> 00:22:42,400 not a normal CircuitPython device plugged in. 493 00:22:42,840 --> 00:22:45,580 But now I've got the three other options 494 00:22:45,580 --> 00:22:52,120 the normal one and I can pick USB and I can then say which of the serial devices that I think the 495 00:22:52,960 --> 00:22:58,700 device is at and now it'll connect up and you can see that I have both a terminal window, 496 00:22:59,140 --> 00:23:02,080 sorry a terminal window and an editor code editor window just as you'd expect. 497 00:23:02,520 --> 00:23:07,620 So I can open up the code.py file. This is all pretty standard now what you'd expect. 498 00:23:07,980 --> 00:23:13,080 I can go over here and I can ctrl+c the program and restart the program and I can edit the program. 499 00:23:13,080 --> 00:23:15,880 Let's make this happen much slower. 500 00:23:16,820 --> 00:23:20,500 And then I save and it should restart the code. 501 00:23:21,100 --> 00:23:22,700 If not, I can just do this. 502 00:23:23,400 --> 00:23:24,540 And so now this happens much slower. 503 00:23:25,020 --> 00:23:30,300 And so this is a really pretty good way of editing code 504 00:23:30,360 --> 00:23:33,640 on an ESP32 board that doesn't have native USB. 505 00:23:34,460 --> 00:23:35,240 And so I'm a big fan. 506 00:23:35,620 --> 00:23:37,880 I've been wanting to play with these little 507 00:23:38,040 --> 00:23:38,840 Sparkle Motion boards. 508 00:23:39,280 --> 00:23:42,820 And now I have an easy way to do it. 509 00:23:44,380 --> 00:23:46,220 Yeah, CircuitPython's really known for 510 00:23:46,820 --> 00:23:48,240 presenting as a flash drive, right? 511 00:23:48,300 --> 00:23:49,680 That's one of the greatest things about it. 512 00:23:49,740 --> 00:23:50,660 But there's, to your point, 513 00:23:50,760 --> 00:23:52,260 there's multiple different ways. 514 00:23:52,300 --> 00:23:54,680 You have choice now in how you want to interact 515 00:23:54,720 --> 00:23:56,260 with your drive when you're programming it. 516 00:23:56,520 --> 00:23:57,280 Yeah, yeah. 517 00:23:57,340 --> 00:24:00,480 And I think a lot of people were throwing aspersions 518 00:24:00,480 --> 00:24:04,300 at CircuitPython early on because the old ESP32, 519 00:24:04,650 --> 00:24:07,380 the original ESP32 was really popular 520 00:24:07,380 --> 00:24:09,880 and it was really popular in micro Python uses in it. 521 00:24:10,180 --> 00:24:12,200 And suddenly CircuitPython was like not. 522 00:24:12,580 --> 00:24:13,680 So everyone was like, why? 523 00:24:13,920 --> 00:24:15,940 Oh, this is not a good thing. 524 00:24:16,520 --> 00:24:17,560 Clearly we should use something else 525 00:24:17,620 --> 00:24:18,200 other than CircuitPython. 526 00:24:18,800 --> 00:24:20,840 But now it's just as easy as using 527 00:24:21,480 --> 00:24:23,980 kind of any other CircuitPython style of interaction. 528 00:24:24,260 --> 00:24:25,000 So thumbs up. 529 00:24:25,040 --> 00:24:25,360 That's right. 530 00:24:26,120 --> 00:24:26,820 Well, that's our show. 531 00:24:27,220 --> 00:24:29,200 A big thank you to Adafruit for having us today 532 00:24:29,580 --> 00:24:30,560 for CircuitPython day 533 00:24:30,620 --> 00:24:32,220 and to Liz for being on camera control. 534 00:24:32,900 --> 00:24:35,100 You can learn more about us by visiting our homepage 535 00:24:35,240 --> 00:24:37,360 at thebootloader.net 536 00:24:37,360 --> 00:24:38,960 show wherever you get your podcasts. 537 00:24:39,700 --> 00:24:43,160 Coming up next is Game Jam with Phonmyguy at 6 30 PM Eastern. 538 00:24:43,720 --> 00:24:45,560 Until next time, stay positive.