1 00:00:03,179 --> 00:00:07,800 Welcome to the CircuitPython Show. I'm your host, Paul Cutler. This episode, I welcome 2 00:00:07,960 --> 00:00:12,460 Sam Blenny to the show. Sam is the author of more than 30 playground notes on Adafruit's 3 00:00:12,520 --> 00:00:17,800 Learn Playground with topics including 3D printing, the Adafruit Fruit Jam, Zephyr, and 4 00:00:18,020 --> 00:00:21,240 more. Sam, welcome to the show. 5 00:00:22,000 --> 00:00:23,580 Hi, good to be here. Thanks for having me. 6 00:00:24,400 --> 00:00:26,680 How did you first get started with computers and electronics? 7 00:00:28,120 --> 00:00:35,180 As a little kid, starting in the 80s, then going on to the 90s as I got into middle school 8 00:00:35,180 --> 00:00:39,980 and high school, I was from a musical family, so there were lots of choir and orchestra 9 00:00:40,080 --> 00:00:43,420 concerts and musicals and plays and things going on around me. 10 00:00:43,940 --> 00:00:48,880 And I spent some time entertaining myself, waiting for rehearsals or whatever. 11 00:00:49,020 --> 00:00:54,359 And during all this, I noticed they were using lots of interesting equipment, lights and 12 00:00:54,360 --> 00:00:57,800 sound and microphones and mixers and lots of stuff. 13 00:00:59,100 --> 00:01:03,320 And so that caught my attention early on and I was always interested in that. 14 00:01:04,060 --> 00:01:09,900 And then another thing that sort of got me going early on electronics was, you know, 15 00:01:10,200 --> 00:01:13,020 this was back in the 80s and we actually shopped at shopping malls. 16 00:01:13,700 --> 00:01:17,420 And so, you know, you'd go in through one store and you'd have to look at all their 17 00:01:17,580 --> 00:01:19,960 stuff and then you'd have to go past all the other stores to get to the thing you were 18 00:01:20,120 --> 00:01:22,240 actually trying to find like in the middle somewhere or whatever. 19 00:01:22,900 --> 00:01:28,620 So we passed by the toy display at Radio Shack a lot as we were just going about our business. 20 00:01:28,680 --> 00:01:30,780 And I always was sort of interested in that. 21 00:01:31,200 --> 00:01:35,880 And that led to further interest in electronic project lab kits. 22 00:01:36,460 --> 00:01:40,100 I'm pretty sure I got a couple of those for Christmas at different years in the Forrest 23 00:01:40,180 --> 00:01:41,600 Mimps books and all that stuff. 24 00:01:42,240 --> 00:01:44,980 So this was like early on setting the stage. 25 00:01:45,700 --> 00:01:48,040 There were electronics around me and I found those interesting. 26 00:01:49,260 --> 00:01:53,780 And for the computers, we got a hand-me-down Atari 400. 27 00:01:54,840 --> 00:02:00,300 This was back in the 80s, and had it hooked up to a black and white TV, and that was the 28 00:02:00,300 --> 00:02:01,540 ones with the keyboard. 29 00:02:02,030 --> 00:02:04,880 So it was an 8-bit computer, not just a video game thing. 30 00:02:05,540 --> 00:02:11,180 And it had ROM Basic and Facemaker and Frogger and probably, I don't know, some Asteroid 31 00:02:11,230 --> 00:02:11,380 thing. 32 00:02:11,410 --> 00:02:11,680 I don't know. 33 00:02:12,560 --> 00:02:13,740 So that got my attention. 34 00:02:14,460 --> 00:02:19,900 And there was also desktop publishing stuff around me for the music people, because, you 35 00:02:19,900 --> 00:02:22,100 know, if you're doing a musical, you've got to have a program. 36 00:02:22,180 --> 00:02:23,940 And so somebody has to make the program. 37 00:02:24,240 --> 00:02:27,960 And if you've got this computer with the desktop publishing, that's a lot easier than doing 38 00:02:27,960 --> 00:02:32,220 it by hand with, I don't know, copy and paste and typewriters and all that. 39 00:02:33,020 --> 00:02:40,140 So people got pretty excited about the Macintosh desktop publishing stuff with the old laser 40 00:02:40,240 --> 00:02:41,020 writer and whatnot. 41 00:02:42,300 --> 00:02:49,520 Then we had a Mac 5 12K E at home, so there was some Dark Castle and Crystal Quest and 42 00:02:50,660 --> 00:02:53,420 Mac Paint and MacWrite and those things. 43 00:02:54,370 --> 00:02:56,780 So that was just setting the stage. 44 00:02:56,940 --> 00:03:00,300 Then come the 90s, I got kind of serious about all of this. 45 00:03:01,480 --> 00:03:06,500 People knew I was interested in things, so I'd get hand-me-down equipment and old computers. 46 00:03:06,620 --> 00:03:12,060 I had a RadioShack TRS-80 Model 100 with ROMBASIC, 47 00:03:12,580 --> 00:03:14,520 and that was a pretty pivotal thing. 48 00:03:14,600 --> 00:03:15,920 I spent a lot of time there. 49 00:03:17,300 --> 00:03:20,680 And so TRS-80 ROMBASIC spent a lot of hours on that. 50 00:03:20,880 --> 00:03:24,680 And then at some point I got a Turbo C compiler, 51 00:03:25,400 --> 00:03:27,560 and by that point it was maybe a Mac Plus 52 00:03:27,980 --> 00:03:29,460 or maybe it was still on the 512k. 53 00:03:29,500 --> 00:03:30,500 I think it was a Mac Plus. 54 00:03:31,820 --> 00:03:36,600 And then I had some old PCs that ran MS-DOS, 55 00:03:37,100 --> 00:03:44,280 And so that got me going on QBasic and I did a lot of programming for school stuff. 56 00:03:45,060 --> 00:03:46,420 I had a hard time with algebra. 57 00:03:46,620 --> 00:03:47,220 I got sick. 58 00:03:48,240 --> 00:03:50,100 I don't know, it was maybe like seventh grade or something. 59 00:03:50,110 --> 00:03:53,820 I got sick and missed one week when they went over something and it was just blowing my 60 00:03:54,040 --> 00:03:54,120 mind. 61 00:03:54,120 --> 00:03:55,000 I couldn't figure it out. 62 00:03:55,680 --> 00:03:59,300 And then at some point, somebody got me this book and I got started like doing some graphs 63 00:03:59,360 --> 00:04:00,520 and things in QBasic. 64 00:04:00,530 --> 00:04:04,040 And it's like, "Oh, so that's what functions do." 65 00:04:04,040 --> 00:04:07,380 It's like you put this number in and you do this math and you put that number and then 66 00:04:07,380 --> 00:04:09,940 you make a pixel there and then you get these curves. 67 00:04:10,720 --> 00:04:13,720 And somehow in school that just never made any sense to me. 68 00:04:13,860 --> 00:04:19,079 But when I got going in QBasic, it was like, "Oh, that's what this is." 69 00:04:19,079 --> 00:04:23,320 And so a lot of my experience with computers in middle school and high school is it's a 70 00:04:23,400 --> 00:04:28,900 thing that has extended my ability to understand stuff. 71 00:04:30,160 --> 00:04:32,220 And this was all like pre-internet. 72 00:04:32,360 --> 00:04:39,500 Most of this was pre-internet at home before the like scourge of AOL CDs, like carpet bombing 73 00:04:39,940 --> 00:04:42,340 everything and it's before all that. 74 00:04:42,440 --> 00:04:47,320 So it's like reading printed manuals when that was a thing and looking, figuring out 75 00:04:47,320 --> 00:04:50,080 how to do stuff for books and a little bit of bulletin board. 76 00:04:50,759 --> 00:04:53,660 So that's what got me going on computers and electronics. 77 00:04:54,880 --> 00:05:00,140 And then there's a third component of this, which was really significant to me, was my 78 00:05:00,260 --> 00:05:03,920 high school didn't have FIRST Robotics, but a friend from across town did. 79 00:05:03,980 --> 00:05:08,360 And one time I got to visit them and that was another sort of mind blowing, "Oh, this 80 00:05:08,420 --> 00:05:09,040 thing exists. 81 00:05:09,340 --> 00:05:11,120 Why didn't somebody tell me this earlier?" 82 00:05:11,120 --> 00:05:12,040 kind of experience. 83 00:05:12,880 --> 00:05:15,100 And I got to help them debug some of their code. 84 00:05:15,140 --> 00:05:18,700 I think they were having troubles with the dead zone on their joystick or something, 85 00:05:18,840 --> 00:05:20,500 because it was an actual analog joystick. 86 00:05:20,860 --> 00:05:23,420 And that was kind of more important with that. 87 00:05:24,680 --> 00:05:30,140 So I learned about these basic stamp microcontrollers and that was a life-altering experience. 88 00:05:31,400 --> 00:05:32,760 And that was all a long time ago. 89 00:05:32,940 --> 00:05:34,000 Much has happened since then. 90 00:05:34,630 --> 00:05:36,240 How did you discover CircuitPython? 91 00:05:37,200 --> 00:05:43,920 So if you do anything with I2C sensors for whatever purpose and you're reading about 92 00:05:44,000 --> 00:05:46,600 them, it's pretty hard not to come across Adafruit stuff. 93 00:05:47,040 --> 00:05:51,680 Adafruit drivers are going to come up if you start searching for things. 94 00:05:52,040 --> 00:05:55,660 And so I'd been aware of that for, I don't know, 95 00:05:56,200 --> 00:05:57,300 I don't even remember when. 96 00:05:58,140 --> 00:06:04,240 And then I think maybe about eight years ago 97 00:06:04,340 --> 00:06:05,960 or sometime around then, 98 00:06:06,180 --> 00:06:10,900 I was trying to do some data logging stuff 99 00:06:11,100 --> 00:06:14,020 for indoor plant things. 100 00:06:14,680 --> 00:06:16,200 I wanted to know what the temperature was 101 00:06:16,200 --> 00:06:16,960 and make some graphs. 102 00:06:18,320 --> 00:06:22,320 I used, I can't even remember which board, 103 00:06:22,400 --> 00:06:23,960 but it was one of the boards that is capable 104 00:06:24,050 --> 00:06:25,340 of running CircuitPython. 105 00:06:26,920 --> 00:06:28,860 And I used some sensors, 106 00:06:28,980 --> 00:06:30,240 I don't know if it was Adafruit sensors 107 00:06:30,290 --> 00:06:32,180 or SparkFun sensors, but at that time, 108 00:06:32,220 --> 00:06:34,720 I was researching a lot of what was on the market. 109 00:06:35,520 --> 00:06:37,860 And so I probably, I can't remember, 110 00:06:38,420 --> 00:06:40,860 this is when CircuitPython wasn't all that far along 111 00:06:40,880 --> 00:06:42,660 and it was a lot more Arduino things. 112 00:06:43,480 --> 00:06:45,639 Ever since then, I had been paying increasingly 113 00:06:45,640 --> 00:06:47,580 more attention to what Adafruit was up to. 114 00:06:48,680 --> 00:06:55,220 And then last year I got going on the circuit Python stuff a lot more seriously. 115 00:06:57,160 --> 00:07:00,340 You've written over 30 Playground Notes on Adafruit's Playground sites. 116 00:07:00,820 --> 00:07:04,300 A number of them are about Adafruit's new RP2350 powered 117 00:07:04,520 --> 00:07:05,620 microcomputer, the FruitJam. 118 00:07:06,580 --> 00:07:10,040 Tell me about the GamePad tester and how you started working with the FruitJam. 119 00:07:10,900 --> 00:07:11,080 Okay. 120 00:07:11,220 --> 00:07:11,340 Yeah. 121 00:07:11,400 --> 00:07:21,140 So with the playground guides, I enjoy technical writing and I had been watching the Ask an Engineer show. 122 00:07:21,320 --> 00:07:39,320 I follow Adafruit stuff on YouTube fairly regularly and PT, aka Mr. Lady Ada on that show, he mentioned that they were doing all this playground guide stuff, that they built this system and they were hoping to get writers interested in putting content there. 123 00:07:39,340 --> 00:07:40,520 and I thought about that and I was like, 124 00:07:40,880 --> 00:07:42,000 yeah, that sounds like a good idea. 125 00:07:42,400 --> 00:07:42,920 I'm gonna do that. 126 00:07:43,800 --> 00:07:48,240 And so I did that and I started off just doing some projects 127 00:07:48,300 --> 00:07:49,540 with the boards I had on hand 128 00:07:49,640 --> 00:07:52,160 and I have a limited parts budget. 129 00:07:52,410 --> 00:07:55,740 I don't let myself just spend wildly on this. 130 00:07:55,840 --> 00:07:57,860 So I started off with what was laying around 131 00:07:58,380 --> 00:08:03,020 and eventually that worked out to doing a game pad tester 132 00:08:03,120 --> 00:08:06,660 on an ESP32 S3 with the TFT display, 133 00:08:07,000 --> 00:08:08,080 the little feather boards. 134 00:08:08,860 --> 00:08:11,960 And I think they may have mentioned that on their Asking an Engineer show. 135 00:08:12,720 --> 00:08:16,740 And then later I did this pumpkins and skeletons game on that same board and 136 00:08:17,000 --> 00:08:18,620 they thought that was interesting. 137 00:08:18,630 --> 00:08:23,300 And so I had, I had this conversation going by email with BT and then at some 138 00:08:23,460 --> 00:08:27,780 point it was like, Hey, this fruit jam board, you want a prototype? 139 00:08:28,270 --> 00:08:29,600 You want to do some projects with it? 140 00:08:29,600 --> 00:08:30,720 And I was like, yes, please. 141 00:08:31,600 --> 00:08:32,520 That sounds awesome. 142 00:08:33,000 --> 00:08:37,399 And so they sent me one of those and they had mentioned that it would be 143 00:08:37,340 --> 00:08:42,240 interesting to have a USB gamepad tester for Fruit Jam. And I was like, yeah, that'd be good. 144 00:08:42,740 --> 00:08:51,740 So I did that. And because it has the USB host and the DVI display, it's possible to do a lot 145 00:08:51,900 --> 00:08:56,560 more than with the little tiny squinty little display on the feather. That's so hard to see. 146 00:08:56,660 --> 00:09:02,580 Like you can get it with a camera to put it in a guide, but you got to get your lighting careful. 147 00:09:02,660 --> 00:09:07,320 Like you got to do the side lighting carefully so that the display doesn't wash out the exposure on 148 00:09:07,320 --> 00:09:11,120 rest of the board and it's all so tiny and if somebody tries to do it, they're like, 149 00:09:11,720 --> 00:09:14,080 "Wow, the screen is really small." 150 00:09:14,100 --> 00:09:17,640 But if you use the DVI output on the Fruit Jam, you can just put it on a monitor and 151 00:09:17,720 --> 00:09:20,560 plug in a gamepad or a keyboard and it's just fabulous. 152 00:09:21,900 --> 00:09:23,380 That's how I got started on that. 153 00:09:24,700 --> 00:09:27,220 What about the USB host MIDI tester? 154 00:09:28,379 --> 00:09:34,100 So the Fruit Jam thing, you know, if you look through my Playground Guide author page, there's 155 00:09:34,000 --> 00:09:38,660 like fruit jam this, fruit jam that, fruit jam the other thing. And it's kind of, I do one project 156 00:09:38,920 --> 00:09:43,480 and I go, "Oh, there's this other thing I'm curious about, but that's too much to put in this 157 00:09:43,580 --> 00:09:47,780 one because I got to write this up and I want to have it finished in a reasonable time. So put it 158 00:09:47,800 --> 00:09:51,660 on the list of things to do next." And you know, one of the obvious things, once I had gotten the 159 00:09:51,660 --> 00:09:57,480 game pad stuff sort of figured out, I was like, "Oh, what about MIDI?" And you know, like as I 160 00:09:57,720 --> 00:10:03,500 said, I come from a musical family, so I'd been aware of MIDI since, you know, a long time ago. 161 00:10:03,980 --> 00:10:06,620 And, you know, it's always been kind of interesting. 162 00:10:08,160 --> 00:10:14,500 And it's also a pretty good stress test for the USB stack because you have to pull because 163 00:10:14,500 --> 00:10:17,340 of the way things are set up with this to get MIDI input. 164 00:10:17,340 --> 00:10:21,280 You got to pull and you got to pull fast and you also have to do the display updates and 165 00:10:21,540 --> 00:10:22,820 there's all this stuff going on. 166 00:10:22,900 --> 00:10:24,560 It's like, yeah, this would be a good stress test. 167 00:10:25,380 --> 00:10:27,000 And so I did that. 168 00:10:27,859 --> 00:10:29,960 And yeah, it worked out pretty nice. 169 00:10:30,580 --> 00:10:35,200 One of the things that I enjoyed doing with that is since I had so many pixels to spend, 170 00:10:35,920 --> 00:10:40,780 I made a grid of USB channels and notes. 171 00:10:41,939 --> 00:10:49,460 So you can see as you blink on it, which channel stuff is coming in on and which note number 172 00:10:49,620 --> 00:10:50,560 it's coming in on. 173 00:10:52,100 --> 00:10:58,500 And sometimes, like if you're doing a percussion thing or a keyboard, you won't necessarily 174 00:10:58,500 --> 00:11:02,880 have the note range mapped where it needs to be for the software instrument that you're using. 175 00:11:03,000 --> 00:11:06,940 And so you like you you'll bang on stuff but you're on the wrong octave so nothing happens or 176 00:11:07,100 --> 00:11:11,080 you know it can be confusing. So it's nice to have stuff like this where you go "oh that's what's 177 00:11:11,180 --> 00:11:18,020 going on". What about the Fritjam color checker? So one of the things that came up when I was 178 00:11:18,320 --> 00:11:23,780 working on that pumpkins and skeletons game or maybe maybe it was the original USB tester that 179 00:11:23,780 --> 00:11:27,900 that I did for the Feather ESP32 S3 TFT thing. 180 00:11:28,580 --> 00:11:33,420 I had made my sprites for display IO tile grid using, 181 00:11:34,060 --> 00:11:35,460 oh, I can't remember the name of the app, 182 00:11:35,500 --> 00:11:38,560 but one of the iPad apps for working on pixel art, 183 00:11:38,720 --> 00:11:42,380 or maybe I used something on Linux. 184 00:11:42,940 --> 00:11:46,860 I can't remember, but it was on a color managed display 185 00:11:47,360 --> 00:11:49,180 using 24 bit colors, 186 00:11:49,180 --> 00:11:51,640 and I just picked out some stuff that looked good. 187 00:11:52,060 --> 00:11:54,820 And then when I got it onto the display and I looked at it, 188 00:11:54,820 --> 00:11:57,040 I was like, whoa, that is not color matched 189 00:11:57,060 --> 00:11:58,620 to what I was doing, what happened? 190 00:11:59,720 --> 00:12:02,540 That had puzzled me and I couldn't really figure out 191 00:12:02,580 --> 00:12:03,140 what was going on. 192 00:12:03,280 --> 00:12:05,020 And at that point, I didn't understand 193 00:12:05,839 --> 00:12:08,020 that when you're doing the eight bit color 194 00:12:08,040 --> 00:12:11,220 or the 16 bit color, which can happen with display IO, 195 00:12:11,420 --> 00:12:14,520 depending upon the hardware and how you initialize things, 196 00:12:15,080 --> 00:12:17,500 that you're actually getting RGB 332. 197 00:12:18,060 --> 00:12:24,420 So three red bits, three green bits, two blue bits, I guess. 198 00:12:25,160 --> 00:12:29,240 And then there's all this quantization and filling 199 00:12:29,440 --> 00:12:31,480 of the low bits when it gets moved 200 00:12:31,760 --> 00:12:35,960 to actually display on hardware that uses more colors. 201 00:12:36,420 --> 00:12:38,800 And then there's the 16-bit version of that, 202 00:12:38,800 --> 00:12:44,140 where you have RGB 565, 5-bit, 6-bits, 5-bits. 203 00:12:44,700 --> 00:12:47,060 And what you really want, if you're 204 00:12:46,860 --> 00:12:50,600 doing a color match thing is RGB 888, 205 00:12:51,080 --> 00:12:52,920 but that's not how these displays work. 206 00:12:53,600 --> 00:12:56,040 And I didn't understand that until I did 207 00:12:56,100 --> 00:12:58,360 that Fruit Jam color checker thing 208 00:12:58,360 --> 00:12:59,480 and really worked through it 209 00:12:59,540 --> 00:13:01,360 and tried out the different video modes 210 00:13:02,180 --> 00:13:03,380 and saw what it did. 211 00:13:05,100 --> 00:13:09,400 That process for me was about how do I get sprites 212 00:13:09,980 --> 00:13:11,200 that have the colors that I want 213 00:13:11,820 --> 00:13:13,900 when I'm trying to make a little thing that uses sprites? 214 00:13:14,860 --> 00:13:21,360 And so people who are trying to make games for Fruit Jam, 215 00:13:21,990 --> 00:13:28,100 if they understand that the RP 2350 is doing these things 216 00:13:28,260 --> 00:13:29,780 when it does the DVI output, 217 00:13:30,500 --> 00:13:32,300 then they can make sprites with colors 218 00:13:32,520 --> 00:13:34,740 that they'll end up being happier with hopefully. 219 00:13:35,100 --> 00:13:37,060 And like one of the things that can happen 220 00:13:37,060 --> 00:13:37,960 is they can be dimmer 221 00:13:39,140 --> 00:13:41,440 because the hardware does a zero fill 222 00:13:41,600 --> 00:13:43,360 when it does bit extension to go from, 223 00:13:43,740 --> 00:13:45,240 say five bits up to eight bits, 224 00:13:45,240 --> 00:13:46,640 you get zeros on the low bits, 225 00:13:47,110 --> 00:13:48,360 which means things can be darker. 226 00:13:49,640 --> 00:13:51,780 - For CircuitPython's upcoming 10.0 release, 227 00:13:51,880 --> 00:13:53,760 you've done some work to improve USB host. 228 00:13:54,200 --> 00:13:56,180 What kind of improvements have you been working on? 229 00:13:57,040 --> 00:13:59,560 - So as I was doing all this stuff 230 00:13:59,620 --> 00:14:01,200 and playing with all these gamepad things 231 00:14:01,240 --> 00:14:03,440 and all I noticed in the MIDI stuff, 232 00:14:03,640 --> 00:14:06,000 sometimes there would be a dropped note or a stuck note, 233 00:14:07,200 --> 00:14:09,220 or as people are building things 234 00:14:09,420 --> 00:14:10,940 with the USB host on Fruit Jam, 235 00:14:11,340 --> 00:14:13,200 you definitely need to catch exceptions. 236 00:14:14,060 --> 00:14:15,120 There will be exceptions. 237 00:14:16,000 --> 00:14:19,020 There'll be timeouts because not all USB devices 238 00:14:19,300 --> 00:14:21,420 will answer you every time you ask them for something. 239 00:14:22,170 --> 00:14:22,920 You have to pull them 240 00:14:23,000 --> 00:14:24,220 and they won't always have something ready 241 00:14:24,320 --> 00:14:26,880 and then you'll get the timeout maybe, or maybe not. 242 00:14:26,980 --> 00:14:29,060 Maybe you'll get something with like zero bytes. 243 00:14:29,750 --> 00:14:32,400 So you got to check, otherwise your code won't work. 244 00:14:32,720 --> 00:14:34,560 And then if somebody unplugs a device 245 00:14:34,740 --> 00:14:36,340 or if certain other things happen, 246 00:14:36,930 --> 00:14:39,060 you may get a USB error exception. 247 00:14:39,680 --> 00:14:40,600 And if you don't check for that, 248 00:14:40,860 --> 00:14:42,320 you won't have any way to know when the, 249 00:14:43,020 --> 00:14:44,120 when somebody unplugged something. 250 00:14:44,220 --> 00:14:45,320 So hot plugging won't work. 251 00:14:46,160 --> 00:14:48,980 So as I was in particular trying to get hot plugging 252 00:14:49,000 --> 00:14:49,900 to work reliably, 253 00:14:50,640 --> 00:14:52,520 I noticed that there was some stuff 254 00:14:52,560 --> 00:14:54,420 that I couldn't do anything about at the Python level. 255 00:14:55,619 --> 00:14:57,500 And I wanted to get to the bottom of it 256 00:14:57,600 --> 00:14:58,820 so that people could just, you know, 257 00:14:59,620 --> 00:15:01,640 plug stuff in and have it work and, you know, 258 00:15:02,140 --> 00:15:03,800 not have to worry about all that nonsense. 259 00:15:05,000 --> 00:15:07,800 And so I got on a little quest to try and figure out 260 00:15:07,800 --> 00:15:08,880 what was actually going on. 261 00:15:08,940 --> 00:15:16,000 I made some issues on GitHub and I did a PR and Scott did a PR and we managed to track down and 262 00:15:16,240 --> 00:15:21,820 fix. One of the things was that there was a bit of an impedance mismatch between the TinyUSB 263 00:15:22,120 --> 00:15:28,340 library underneath and in CircuitPython that was using TinyUSB. They didn't quite agree on 264 00:15:29,440 --> 00:15:33,339 some of the error handling. Like there were things that could come up from TinyUSB 265 00:15:34,140 --> 00:15:39,920 that CircuitPython would treat as if it was something else instead of, you know, the right 266 00:15:40,080 --> 00:15:44,400 error condition. I'm a little fuzzy on the details. The way I handle all this stuff is like, 267 00:15:44,420 --> 00:15:48,800 you know, I write it down and then I move on with my life. But the basic idea was there were some 268 00:15:48,960 --> 00:16:04,120 error codes that weren't being checked for at the interface between TinyUSB and CircuitPython. And 269 00:16:04,120 --> 00:16:09,560 that was over my head and Scott sorted that out, which is related to some other things that had 270 00:16:09,560 --> 00:16:18,060 been having DMA trouble. I think it's if the DMA is coming, if it's to or from the SRAM that's on 271 00:16:18,120 --> 00:16:24,580 the RP-2350 itself, everything's cool. But if you're trying to use the PSRAM chip that's external, 272 00:16:25,340 --> 00:16:31,660 then things can get weird. And so if you don't prevent the PSRAM from getting included in a DMA 273 00:16:32,280 --> 00:16:36,800 transfer, you can have strange things happen. And we were having strange things happen and 274 00:16:36,800 --> 00:16:38,120 Scott figured out how to fix that. 275 00:16:38,730 --> 00:16:39,860 Well, that's pretty cool. I'll make 276 00:16:39,880 --> 00:16:44,660 sure I link to some of those PRs in the show notes as well. Last question I ask each guest, 277 00:16:45,060 --> 00:16:48,760 you're going to start a new project or prototype, which board do you reach for? 278 00:16:49,070 --> 00:16:52,020 Scott Trent (00:36:40): It depends. There are a lot of 279 00:16:53,180 --> 00:16:58,699 reasons why you might want to do one thing over another. Maybe you're broke or you've got a big 280 00:16:58,600 --> 00:17:03,580 parts pile that your wife or someone is wanting you to clean up or you know what 281 00:17:03,620 --> 00:17:07,160 there are reasons why it makes sense just use the thing you have if you're 282 00:17:07,160 --> 00:17:11,079 just messing around and you got some stuff use what you have there are times 283 00:17:11,199 --> 00:17:16,920 when you need to hit specific functional requirements like say you want to do 284 00:17:17,220 --> 00:17:22,520 something to monitor plants and it's going to be potentially exposed to 285 00:17:23,439 --> 00:17:27,800 moisture like if you put things outside where it's not temperature controlled it 286 00:17:27,800 --> 00:17:30,560 It may be not out in the rain and the snow, 287 00:17:30,800 --> 00:17:31,860 but there's gonna be condensation 288 00:17:32,100 --> 00:17:34,260 because there's gonna be so much temperature change 289 00:17:34,980 --> 00:17:36,960 and you're gonna have to account for, 290 00:17:37,960 --> 00:17:39,640 okay, I need to put a dust cap back in there. 291 00:17:39,720 --> 00:17:41,380 And when you're in that kind of a situation, 292 00:17:41,430 --> 00:17:43,120 you need to think about your requirements. 293 00:17:43,360 --> 00:17:45,400 Like if this is gonna run a battery, 294 00:17:45,560 --> 00:17:47,520 how long do I need to go before I can charge 295 00:17:47,580 --> 00:17:48,560 or swap the batteries? 296 00:17:49,620 --> 00:17:51,820 What does that mean about which boards I should use? 297 00:17:51,900 --> 00:17:57,300 Like the ESP32 variants do quite well on low power. 298 00:17:58,000 --> 00:18:04,200 but they're not all the same. And then say, "Okay, I want to do solar." Then you're 299 00:18:04,200 --> 00:18:08,320 going to have to think about, "Well, I need a battery and I need a charger, but which 300 00:18:08,440 --> 00:18:12,340 board that can run on a battery is compatible with a charger?" And that will narrow you 301 00:18:12,420 --> 00:18:17,660 down to a couple things. Like, Ladeata has introduced recently some feather boards that 302 00:18:17,720 --> 00:18:23,360 have a jumper on the back that you can cut. It'll be like CHG or charger or something. 303 00:18:23,400 --> 00:18:27,600 and you cut that and it pulls the normal feather charger out of the circuit. 304 00:18:27,620 --> 00:18:31,980 So then you can use one of the solar charger boards and it won't burn anything 305 00:18:32,220 --> 00:18:35,140 up. So that's just kind of a, 306 00:18:35,360 --> 00:18:40,080 an engineering thing and that's how I think it's like sometimes it doesn't 307 00:18:40,240 --> 00:18:43,640 matter. Then you can understand your requirements are do whatever you want. 308 00:18:44,580 --> 00:18:49,160 And then sometimes other things do matter. You've got a budget, you've got, 309 00:18:49,500 --> 00:18:51,300 you know, maybe you've got a deadline, you know, 310 00:18:51,300 --> 00:18:56,100 Maybe it makes sense to spend more and get something done fast, or maybe you need to 311 00:18:56,220 --> 00:18:56,800 make a lot of them. 312 00:18:56,900 --> 00:19:00,560 So you really need to think about how much it costs, or maybe you have some weather thing 313 00:19:00,620 --> 00:19:06,120 that you're like, you need to make sure it won't get wet and die on your second day out 314 00:19:06,340 --> 00:19:07,000 or whatever. 315 00:19:07,340 --> 00:19:08,560 So it depends. 316 00:19:10,110 --> 00:19:11,580 Sam, thanks so much for coming on the show. 317 00:19:12,800 --> 00:19:13,440 Thanks for having me. 318 00:19:14,760 --> 00:19:16,680 Thank you for listening to the CircuitPython Show. 319 00:19:17,180 --> 00:19:21,320 For show notes and transcripts, visit www.circuitpythonshow.com. 320 00:19:21,900 --> 00:19:23,980 And if you're enjoying the show, please leave a review. 321 00:19:24,200 --> 00:19:25,220 It really does help. 322 00:19:25,580 --> 00:19:27,400 Until next time, stay positive.