1 00:00:02,300 --> 00:00:03,840 Welcome to The CircuitPython Show. 2 00:00:04,040 --> 00:00:05,080 I'm your host, Paul Cutler. 3 00:00:05,640 --> 00:00:07,300 This episode I welcome back Tod Kurt. 4 00:00:07,920 --> 00:00:09,440 This is Tod's third visit to the show, 5 00:00:09,520 --> 00:00:13,160 and you may also know him from our other podcast we host together, The Bootloader. 6 00:00:14,820 --> 00:00:16,139 Tod is co-founder of Thingm, 7 00:00:16,560 --> 00:00:20,100 a ubiquitous computing device studio based in Pasadena and San Francisco. 8 00:00:20,540 --> 00:00:23,660 He is the creator of the popular Blink1 USB notification light 9 00:00:23,840 --> 00:00:26,680 and BlinkM, the smart LED prototyping device for Arduino. 10 00:00:27,440 --> 00:00:29,980 Tod is a contributor to Make Magazine, author of the 11 00:00:30,020 --> 00:00:35,240 hacking Roomba, an active member in the Arduino and CircuitPython communities, and co-founder 12 00:00:35,360 --> 00:00:37,720 of the Los Angeles Hacker Space Crash Space. 13 00:00:39,120 --> 00:00:43,880 His past professions include Systems Architect for go-to.com, the first pay-per-click search engine, 14 00:00:44,520 --> 00:00:46,800 and an ML researcher at Yahoo Research Labs. 15 00:00:47,360 --> 00:00:51,220 Before that, Tod was a hardware and firmware engineer working on robotic camera systems 16 00:00:51,360 --> 00:00:52,680 for probes that went to Mars. 17 00:00:53,720 --> 00:00:55,180 Tod, welcome back to the CircuitPython show. 18 00:00:55,660 --> 00:00:56,340 Hey, thanks for having me. 19 00:00:57,200 --> 00:00:59,920 I had Dan Halbert on earlier this year, and we chatted about 20 00:00:59,980 --> 00:01:04,860 building CircuitPython. It's recommended to do this on Linux, but not everyone has Linux or the 21 00:01:05,140 --> 00:01:09,480 knowledge to get up and running with Linux. You've come up with another solution for building 22 00:01:09,720 --> 00:01:12,800 CircuitPython using GitHub actions. Tell me more about it. 23 00:01:12,800 --> 00:01:14,900 Well, so this all started because 24 00:01:15,940 --> 00:01:22,340 if you ever submit a pull request to the CircuitPython repo, it will automatically rebuild 25 00:01:22,960 --> 00:01:29,940 all the firmwares for all the boards and see if they all still work, like work in the sense of, do they 26 00:01:29,960 --> 00:01:32,140 fit in the available flash space for the board. 27 00:01:32,620 --> 00:01:34,040 And are there any compile problems? 28 00:01:34,680 --> 00:01:38,100 Because if you're only testing your little change on one board, 29 00:01:38,620 --> 00:01:42,160 and it's something that can be used on other boards, on different architectures, 30 00:01:42,500 --> 00:01:43,160 there might be problems. 31 00:01:43,260 --> 00:01:44,300 And this has happened to me a lot. 32 00:01:44,400 --> 00:01:50,220 So it's really great that one of the gates that a pull request has to go through to be 33 00:01:50,380 --> 00:01:53,780 accepted into CircuitPython is that it has to pass through. 34 00:01:54,320 --> 00:01:55,780 Does it build for all the boards? 35 00:01:55,780 --> 00:01:58,420 And there's like, what, 700, 800 boards now? 36 00:01:58,560 --> 00:01:59,920 So like, this is a pretty big list. 37 00:01:59,940 --> 00:02:00,980 I think they've changed it recently. 38 00:02:01,180 --> 00:02:05,840 So if it detects that your change is only for a certain class of boards, 39 00:02:05,940 --> 00:02:07,140 it'll only build that class. 40 00:02:07,720 --> 00:02:12,140 So that's really handy because they're using the same build process for these PRs. 41 00:02:12,220 --> 00:02:14,960 They use to build the official firmware for CircuitPython, 42 00:02:15,780 --> 00:02:21,760 which means you can get a pretty accurate test of what your firmware will look like for reels. 43 00:02:21,940 --> 00:02:24,080 Whereas like, you know, if you're building on your computer, 44 00:02:24,560 --> 00:02:28,700 you can set up the CircuitPython build environment to work on Windows or Mac, 45 00:02:28,800 --> 00:02:30,140 which is what I usually do, or on Linux, 46 00:02:30,220 --> 00:02:31,040 which is the preferred way. 47 00:02:31,480 --> 00:02:32,560 But even if you're on Linux, 48 00:02:33,100 --> 00:02:35,140 you might have a different version of the, say, 49 00:02:35,240 --> 00:02:37,840 ARM-GCC compiler because that's installed globally. 50 00:02:37,980 --> 00:02:39,760 That's not installed just in the CircuitPython directory. 51 00:02:40,820 --> 00:02:43,640 And so there's been a lot of weird changes 52 00:02:43,800 --> 00:02:45,360 over the last 10 years of CircuitPython, 53 00:02:46,000 --> 00:02:47,740 where a small change in the compiler version 54 00:02:47,840 --> 00:02:50,620 will actually change a big amount of how the code gets compiled. 55 00:02:52,440 --> 00:02:55,299 So having something that produced CircuitPython firmware 56 00:02:56,720 --> 00:03:03,580 via a GitHub action that is fully like the way that CircuitPython is really built was my initial goal. 57 00:03:03,910 --> 00:03:08,380 And I'm like, can I make a service so that anybody can go and just say, 58 00:03:08,860 --> 00:03:15,960 I want a version of CircuitPython for the Resbrae Pi Pico that doesn't have ePaper support, 59 00:03:16,160 --> 00:03:19,460 but also includes a bunch of frozen built-in libraries. 60 00:03:19,640 --> 00:03:20,920 Because you can do that with CircuitPython. 61 00:03:21,820 --> 00:03:23,280 And that's a pretty big ask. 62 00:03:23,420 --> 00:03:27,900 That's a, you can do that on the command line, you know, if you know what to do. 63 00:03:29,180 --> 00:03:29,580 But it's hard. 64 00:03:29,680 --> 00:03:32,080 And so I started on this pathway, it's just starting this path. 65 00:03:32,440 --> 00:03:42,500 And it turned out that like, oh, doing it for everybody is hard because I am now sort of using up my GitHub actions credits for anybody. 66 00:03:43,160 --> 00:03:50,740 If you are a GitHub, if you have a GitHub account, you can make a little GitHub token and then run the action really easily on your own account. 67 00:03:51,720 --> 00:03:56,600 So there's this project that I created three months ago now called, what is even it called? 68 00:03:57,040 --> 00:03:57,900 CircuitPython Custom. 69 00:03:58,780 --> 00:04:09,940 And it started out as first, as I said, of tools I used on the CircuitPython checkout to sort of see what boards there were available in terms of the board IDs are. 70 00:04:10,520 --> 00:04:11,400 Give me a list of those. 71 00:04:11,820 --> 00:04:16,600 And then it turned into, for a given board, show me all the things that are enabled for it. 72 00:04:17,720 --> 00:04:18,640 because you might have seen, 73 00:04:19,359 --> 00:04:21,120 if you ever go to the CircuitPython documentation, 74 00:04:21,859 --> 00:04:23,460 there's a lot of built-in modules, 75 00:04:23,960 --> 00:04:25,860 but they're not built in for all boards. 76 00:04:27,020 --> 00:04:28,240 That's kind of confusing, I felt. 77 00:04:28,940 --> 00:04:31,020 I wish there was a better way that it showed that. 78 00:04:31,320 --> 00:04:33,920 Maybe you could pick a board at the top, 79 00:04:34,000 --> 00:04:36,120 and it would then kind of gray out the modules 80 00:04:36,260 --> 00:04:37,260 that aren't available to you. 81 00:04:37,440 --> 00:04:40,400 Because in the case of SD cards, for instance, 82 00:04:40,560 --> 00:04:42,900 there's two major ways of talking to SD cards. 83 00:04:43,760 --> 00:04:45,940 The module called, I think it's just called SD card, 84 00:04:46,480 --> 00:04:51,540 And there's a module called SDIO, which is four to 10 times faster or more. 85 00:04:51,980 --> 00:04:54,380 But that only exists on, I think, ESP 32. 86 00:04:55,140 --> 00:05:00,900 I think it might be available soon for Raspberry Pi Pico, but, you know, it's kind of a bummer. 87 00:05:00,900 --> 00:05:01,480 We don't have that. 88 00:05:03,100 --> 00:05:06,520 I know Dan's been doing a lot of work on SD cards lately. 89 00:05:06,600 --> 00:05:09,080 So you're probably right that something is coming soon. 90 00:05:09,480 --> 00:05:16,060 As more of Adafruit's products explicitly, but as more products in general have SD card sockets on them, 91 00:05:16,520 --> 00:05:17,200 to store stuff. 92 00:05:17,820 --> 00:05:21,300 It makes a lot of sense to use the faster way of talking to SD cards. 93 00:05:22,800 --> 00:05:29,520 So this tool kind of became an outgrowth of me just trying to figure out what the heck, 94 00:05:30,460 --> 00:05:39,200 how the CircuitPython repo works in terms of like board IDs and these various build flags 95 00:05:39,200 --> 00:05:43,619 that turn on and off various modules, you know, that turn on and off, say, the touch sensor 96 00:05:43,840 --> 00:05:48,120 or the keypad or the neopixel or, you know, talking to floppy disks, you know, 97 00:05:48,160 --> 00:05:49,460 do I really need floppy disk support? 98 00:05:49,600 --> 00:05:49,940 Probably not. 99 00:05:50,040 --> 00:05:50,620 Let's turn that off. 100 00:05:51,220 --> 00:05:52,540 And just learning how to do all that. 101 00:05:52,540 --> 00:05:54,160 And I figured how to do all that on the command line. 102 00:05:54,940 --> 00:05:59,440 But even when I would do a normal build, I would notice that my builds were a little bit 103 00:05:59,700 --> 00:06:02,460 different in size than the official builds. 104 00:06:02,780 --> 00:06:08,280 And it's like, oh, that's because I'm doing it on a Mac with this particular version of 105 00:06:09,180 --> 00:06:10,840 the ARMGCC compiler or something. 106 00:06:11,990 --> 00:06:13,600 And so then I started making it again. 107 00:06:13,640 --> 00:06:15,820 GitHub action that would trigger on my thing. 108 00:06:16,180 --> 00:06:20,380 I'm like, well, it's still hard for me to get all that information into that action. 109 00:06:20,560 --> 00:06:27,540 So let's build a little thing that is now a web page, lets you turn on and off these various 110 00:06:27,740 --> 00:06:28,200 build flags. 111 00:06:29,140 --> 00:06:34,120 And it shows you what command line commands that turns into if you did want to run it on 112 00:06:34,220 --> 00:06:34,860 your own computer. 113 00:06:35,360 --> 00:06:40,480 But at the bottom, you can also trigger a build on this little custom web page, and it will 114 00:06:40,680 --> 00:06:42,720 trigger the action, and then it will build it. 115 00:06:42,840 --> 00:06:47,700 And then you can just download it from your actions directory or from your actions tab on GitHub. 116 00:06:48,700 --> 00:06:51,420 I'll link to this page in the show notes, but this is fantastic. 117 00:06:52,020 --> 00:06:57,920 You can search all the boards so you can choose like Raspberry Pi Pico like you mentioned, give it a custom name. 118 00:06:58,480 --> 00:07:02,020 And then you choose in checkboxes the different features you want to add. 119 00:07:02,420 --> 00:07:04,320 And you've got it split up into core I.O. 120 00:07:04,640 --> 00:07:07,120 Display, audio, wireless and networking. 121 00:07:07,300 --> 00:07:08,240 I could keep going on. 122 00:07:08,320 --> 00:07:12,480 So you've made it really easy for the user to figure out which modules they might want. 123 00:07:12,880 --> 00:07:22,100 This is one way, one area where I had Claude Code, help me out because, so there's this one big file that contains all of these defines. 124 00:07:22,480 --> 00:07:33,180 They're all CIRCUITPY underscore and then a name like bus I.O, PwMIO, you know, circuit pie underscore can IO for the Canbus interface, if you know what that is. 125 00:07:34,170 --> 00:07:42,220 And all of these defines are defined for all the builds, but they only apply to certain what are called ports, 126 00:07:42,380 --> 00:07:47,500 basically which certain chips like the ESP 32 or the RP2040 or something. 127 00:07:48,120 --> 00:07:56,120 And then there's also, you could, you could in theory have these defines that only work for a very specific board inside of a port. 128 00:07:56,680 --> 00:08:10,660 And so it was very confusing to know which of these magic defines are defined for all of CircuitPython, for defined just for, say, ESP 32, and it defined just for just for this board. 129 00:08:10,820 --> 00:08:17,540 And so I tried to make a little interface that split it out both conceptually, like, oh, this is for core stuff. 130 00:08:17,620 --> 00:08:18,500 This is for display stuff. 131 00:08:18,500 --> 00:08:19,100 This is for USB. 132 00:08:20,130 --> 00:08:26,240 But also showed when the thing was defined for a specific port for a chip. 133 00:08:27,080 --> 00:08:28,160 It's not perfect. 134 00:08:30,479 --> 00:08:37,380 But it does let you see that like, oh, for the Raspberry Pi Pico, if I select that, I can see that, okay, 135 00:08:38,020 --> 00:08:40,760 CircaPi underscore Pults IO is defined on the port. 136 00:08:40,840 --> 00:08:43,560 level, which means for all RP 2040s. 137 00:08:44,380 --> 00:08:49,680 And Circa Pi underscore PicoDVI is defined at the board level. 138 00:08:50,040 --> 00:08:51,800 So it's defined just for the Raspberry Pi Pico. 139 00:08:52,090 --> 00:08:57,480 So it probably won't be defined for another RP2040 based board that is smaller. 140 00:08:57,540 --> 00:09:01,780 Like maybe the QDPI won't have the Pico DVI thing enabled because it doesn't have 141 00:09:01,840 --> 00:09:03,460 enough pins for instance. 142 00:09:05,480 --> 00:09:10,240 And like turning on and off, each of these can have big implications on how big the 143 00:09:10,140 --> 00:09:14,820 eventual firmware is. If you turn on too many of them, the build maybe won't even work because 144 00:09:15,060 --> 00:09:20,200 you're turned on a feature that isn't available for that board, or it'll bust the amount of 145 00:09:20,360 --> 00:09:22,840 memory you have available to put your CircuitPython inside of. 146 00:09:24,400 --> 00:09:28,840 One of the neat things is at the bottom of the page, you have the CLI equivalence. So you actually 147 00:09:28,940 --> 00:09:33,420 can show the user. This is what it would look like if you were doing it in the command line on a 148 00:09:34,080 --> 00:09:34,180 computer. 149 00:09:34,180 --> 00:09:38,060 Yeah, this is actually what I use the most is I'll go through and I'll click, click, click, 150 00:09:38,080 --> 00:09:43,040 click on things, and then it'll tell me, okay, run these commands to do that. 151 00:09:43,460 --> 00:09:46,780 Because I have a CircuitPython build environment kind of set up all the time. 152 00:09:48,980 --> 00:09:54,920 And yes, I could wait for the like five minutes it takes for GitHub actions to do a build if I want it to be exact. 153 00:09:55,280 --> 00:10:08,000 But if I'm just testing stuff out, like, oh, let's see if I can add in, for instance, one of these you can do is you can put in a bunch of what are called frozen modules, basically put in pure Python, CircuitPython libraries into the circuit. 154 00:10:08,080 --> 00:10:13,560 Python firmware. And so you can do that for the ones that the CircuitPython checkout knows about. 155 00:10:14,100 --> 00:10:19,620 You can just go click, click, click, and turn on like the Neopixel or the MIDI library or something 156 00:10:20,200 --> 00:10:25,380 like that. And then you can see what those commands are, which then tells you, oh, when I do that, 157 00:10:25,460 --> 00:10:32,740 it's actually creating a file called user underscore pre-UMP config port.mk, and you can add extra 158 00:10:32,920 --> 00:10:36,339 stuff in there. So you can, oh, I can add other stuff. I can add other libraries that aren't 159 00:10:36,360 --> 00:10:37,400 in this list, for instance. 160 00:10:38,080 --> 00:10:42,300 Could you add custom code that you've written for the board in addition to libraries? 161 00:10:44,060 --> 00:10:46,380 Yeah, but then at that point, I wouldn't be using this tool. 162 00:10:46,450 --> 00:10:47,560 Like, this is what I did recently. 163 00:10:48,200 --> 00:10:50,940 I wrote a CircuitPython core module. 164 00:10:51,200 --> 00:10:56,200 It's now a core module that we used to not be a core module, but Scott thought it was 165 00:10:56,680 --> 00:10:57,760 useful enough to be a core module. 166 00:10:58,380 --> 00:11:04,760 It was for this UREX synthesizer device that has a very strange digital analog converter 167 00:11:05,280 --> 00:11:07,920 that needed very specific types of commands 168 00:11:08,140 --> 00:11:12,060 that the existing CircuitPython code didn't support. 169 00:11:12,200 --> 00:11:14,720 And so I wrote a C code with a Python class 170 00:11:14,800 --> 00:11:15,620 that was custom to it, 171 00:11:16,140 --> 00:11:19,780 and it was inside the directory for just that board. 172 00:11:20,440 --> 00:11:21,120 And it worked great. 173 00:11:22,340 --> 00:11:23,900 But it was like it was a whole thing. 174 00:11:23,900 --> 00:11:26,680 And it was basically an extension of this custom file. 175 00:11:27,300 --> 00:11:28,180 There's other things you can add. 176 00:11:28,780 --> 00:11:29,700 But then Scott was like, 177 00:11:29,880 --> 00:11:30,900 hey, this should be a core module. 178 00:11:31,020 --> 00:11:31,860 I'm like, well, that changes. 179 00:11:32,300 --> 00:11:33,900 That makes it a much bigger problem 180 00:11:33,980 --> 00:11:36,960 because now I have to make these files work for kind of all of Python. 181 00:11:37,160 --> 00:11:38,800 I'll sort of Python instead of just this board. 182 00:11:40,200 --> 00:11:40,860 But it all worked out. 183 00:11:42,660 --> 00:11:43,940 So walk me through the process. 184 00:11:44,280 --> 00:11:46,600 If I want to do this, I fork your repo first. 185 00:11:47,320 --> 00:11:47,540 Yes. 186 00:11:47,980 --> 00:11:51,360 And I get my GitHub actions token ready. 187 00:11:52,020 --> 00:11:53,540 And I come back to your web page. 188 00:11:53,620 --> 00:11:57,060 I don't have to fork the web page or anything like that. 189 00:11:58,339 --> 00:12:00,200 You need to fork. 190 00:12:01,040 --> 00:12:01,620 Well, let's see. 191 00:12:03,760 --> 00:12:03,880 Yes. 192 00:12:03,900 --> 00:12:05,240 You must fork this repo. 193 00:12:05,340 --> 00:12:07,020 Yeah, you must fork the repo. 194 00:12:07,840 --> 00:12:09,840 Yeah, I tried, this is the thing. 195 00:12:09,920 --> 00:12:13,620 I tried for about a week to get this to work where you didn't have to fork the repo. 196 00:12:17,080 --> 00:12:22,680 But basically, if you fork the repo and enable actions for this fork, 197 00:12:23,080 --> 00:12:28,920 then it'll create the webpage for you, your own version of this web page that I'm hosting on my repo. 198 00:12:29,440 --> 00:12:33,860 And then at that point, you can paste in your workflow scope, personal access. 199 00:12:33,880 --> 00:12:36,760 access token that you create from GitHub.com. 200 00:12:37,320 --> 00:12:40,660 And then you can trigger build and it will run the action for you. 201 00:12:41,300 --> 00:12:42,660 But yeah, you do need to fork the repo. 202 00:12:43,380 --> 00:12:43,580 Right. 203 00:12:44,160 --> 00:12:48,480 I was just confused about the web page, whether I used yours or whether I used the one that's 204 00:12:48,600 --> 00:12:49,620 in my own fork. 205 00:12:50,360 --> 00:12:54,420 Yeah, I mean, for exploration, you can just use the web page to see like, oh, what 206 00:12:55,320 --> 00:12:57,520 command line commands does this correspond to? 207 00:12:57,980 --> 00:13:01,280 And also, it's fun to sort of see, like, one of things that I found really, 208 00:13:01,440 --> 00:13:08,500 really fascinating is to see how many different devices and types of processing or whatever that 209 00:13:08,980 --> 00:13:14,560 CircuitPython supports. There's this thing called Font I.O. That is built in. I didn't even really 210 00:13:14,760 --> 00:13:20,060 understand that was a thing. You can go in and look at it and go, oh, that's pretty cool. But, you know, 211 00:13:20,160 --> 00:13:23,860 one of the things that I've had to do in the past is I've had to turn off a bunch of stuff. Like, 212 00:13:23,920 --> 00:13:30,580 when I was doing a bunch of CircuitPython with Sam D21, the original cutie pie, it's got no space. 213 00:13:31,160 --> 00:13:32,320 It's filled to the brim. 214 00:13:32,680 --> 00:13:35,680 And so any little change you make will like overflow it. 215 00:13:35,700 --> 00:13:42,200 And so I was used to going in and turning off on the command line, turn off this library, turn off that library, turn off this other library. 216 00:13:42,470 --> 00:13:44,460 And so I could add my extra code to it. 217 00:13:44,960 --> 00:13:51,940 But it was always kind of a, it was always kind of hard to figure out quickly at a glance which things are enabled, which things are not enabled. 218 00:13:52,430 --> 00:13:59,980 And so one of the things I like using this webpage for, even if you don't trigger a build is just, oh, this is what it's, this is what's enabled. 219 00:14:00,180 --> 00:14:02,560 For this particular board, these are the things that enable. 220 00:14:02,740 --> 00:14:04,760 So you can like, right now I can go into the board. 221 00:14:04,840 --> 00:14:06,000 I can type in QD-Po. 222 00:14:07,020 --> 00:14:07,760 There we go, QDipi. 223 00:14:08,700 --> 00:14:12,480 And I can choose the QDiPiM-Zero, which is the SAMD-21. 224 00:14:13,220 --> 00:14:14,960 And I see that, yeah, most things are turned off. 225 00:14:15,600 --> 00:14:21,240 But one of the things that is turned on is the Circupi underscore PS2 I.O, which is for the, sorry, 226 00:14:21,280 --> 00:14:23,540 the PS2 keyboard and mouse support. 227 00:14:23,720 --> 00:14:25,260 You have the old, old IBMs. 228 00:14:25,560 --> 00:14:26,580 Like, I can turn that off. 229 00:14:26,600 --> 00:14:28,440 I can probably save like maybe 100 bytes from that. 230 00:14:29,640 --> 00:14:30,280 It adds up. 231 00:14:31,380 --> 00:14:32,500 And that might give me just enough, yeah. 232 00:14:34,740 --> 00:14:37,600 So most folks might know us from hosting the bootloader, 233 00:14:37,720 --> 00:14:39,780 and recently you shared serial plotster. 234 00:14:41,200 --> 00:14:45,240 And we're all sad that Mova's been sunset and won't be getting any more updates. 235 00:14:46,000 --> 00:14:50,060 So you took it on yourself to write your own serial plotter in Rust. 236 00:14:50,380 --> 00:14:51,960 Tell me a little bit about serial plotter. 237 00:14:52,420 --> 00:14:58,800 I don't know if many people actually use the serial plotter that's built in to say the Arduino IDEE, 238 00:14:59,400 --> 00:15:02,340 or I think even Thani has a plotter now, 239 00:15:02,440 --> 00:15:03,260 but you knew had a platter, 240 00:15:03,340 --> 00:15:04,160 and it was a very good plotter, 241 00:15:04,660 --> 00:15:06,540 and it was a multi-value plotter, 242 00:15:06,640 --> 00:15:09,240 so you could, like, print out a Python array, 243 00:15:09,580 --> 00:15:11,140 and it would know how to plot that. 244 00:15:11,620 --> 00:15:16,460 And so it was a really great way to, like, do a level up from printf debugging. 245 00:15:16,760 --> 00:15:18,040 You can actually see value debugging, 246 00:15:18,200 --> 00:15:20,100 where you can kind of see how values change over time. 247 00:15:21,020 --> 00:15:22,100 I'm a command line guy. 248 00:15:22,320 --> 00:15:25,900 You know, I edit my files and a text editor that isn't part of an IDE. 249 00:15:26,070 --> 00:15:28,720 I use Tio, the commandling tool to talk to serial ports. 250 00:15:29,100 --> 00:15:30,260 in a terminal window. 251 00:15:30,720 --> 00:15:34,780 And so I'm like, well, let's have another program by itself that is a serial plotter. 252 00:15:34,780 --> 00:15:37,160 And I had one several years ago. 253 00:15:37,840 --> 00:15:41,080 And of course, because of time, you know, it doesn't work anymore. 254 00:15:41,680 --> 00:15:44,300 And I'm like, well, you know, the serial plotter isn't that hard. 255 00:15:44,520 --> 00:15:46,940 It's just reading values and graphing them on an X-Y. 256 00:15:47,600 --> 00:15:58,720 And there's this toolkit called Tori, T-A-U-R-I that is a, it's a rust environment that lets you 257 00:15:59,500 --> 00:16:03,440 web pages for the GUI and then Rust for the back end. 258 00:16:03,600 --> 00:16:05,700 If your application has a back end, 259 00:16:05,810 --> 00:16:09,400 like a lot of people, like if their application is entirely a web page, 260 00:16:09,840 --> 00:16:11,800 the actual Rust involved is very little. 261 00:16:11,960 --> 00:16:15,040 It's just all JavaScript in a browser window, basically. 262 00:16:15,520 --> 00:16:17,820 And it's basically like a Rust version of Electron, 263 00:16:17,820 --> 00:16:18,640 if you know what electron is. 264 00:16:19,240 --> 00:16:23,280 But the benefit of Towery is that it like makes executables 265 00:16:23,310 --> 00:16:25,380 that are 10 megs instead of 200 megs, 266 00:16:26,080 --> 00:16:28,600 because it uses the OS's built-in, 267 00:16:28,860 --> 00:16:35,420 web render, which on Mac is WebKit on Windows, it's Edge or something, which is 268 00:16:35,560 --> 00:16:36,340 chromium-based, I think. 269 00:16:37,480 --> 00:16:41,120 And so, I don't know Rust, but I love this idea of Tari. 270 00:16:41,720 --> 00:16:50,300 Let's have Cloud Code help me write the Rust to graph stuff on an HTML Canvas, because 271 00:16:50,640 --> 00:16:52,040 you know, that's a real solved problem. 272 00:16:52,120 --> 00:16:52,640 That's easy. 273 00:16:52,760 --> 00:16:58,160 You know, the GUI for that kind of stuff, you just do HTML elements and canvas commands 274 00:16:58,180 --> 00:17:03,620 to draw lines, but how do you talk to rest? How do you write the rest to talk to a serial port? 275 00:17:05,180 --> 00:17:09,100 And so I had, I had cloud helping out with that. Talking to serial ports is pretty easy. 276 00:17:09,600 --> 00:17:15,880 Once you know how that works, seeing how it works in rest is pretty obvious. The main thing for me 277 00:17:16,180 --> 00:17:21,480 was once I got it working was trying to get it to work at audio rates. So for instance, if I'm 278 00:17:22,750 --> 00:17:28,140 like reading data from an audio device, I want to be able to maybe see that as an audio waveform on 279 00:17:28,160 --> 00:17:30,780 little plotter and doing that quickly is hard. 280 00:17:31,600 --> 00:17:32,580 Mew had a hard time with this. 281 00:17:33,100 --> 00:17:36,080 I think serial ploster actually works pretty good at that. 282 00:17:36,680 --> 00:17:37,820 So I'm pretty proud of that part. 283 00:17:39,620 --> 00:17:43,440 Yeah, the only thing that threw me with the serial ports and I use Tio like you do is once 284 00:17:43,660 --> 00:17:46,560 serial plotster's running, you can't connect via Tio. 285 00:17:47,320 --> 00:17:47,500 Yeah. 286 00:17:47,980 --> 00:17:53,200 Yeah, this is the terrible problem with serial ports is that only one program can talk to 287 00:17:53,520 --> 00:17:54,480 the serial port at a time. 288 00:17:54,580 --> 00:17:58,080 So you have to do the dance of disconnecting Tia. 289 00:17:58,460 --> 00:18:00,700 and then opening up your serial plotter, 290 00:18:01,100 --> 00:18:02,520 and then disconnecting the serial plotter, 291 00:18:02,900 --> 00:18:03,740 reopening T.O. 292 00:18:04,560 --> 00:18:05,780 If I was serious about this, 293 00:18:06,180 --> 00:18:07,260 CircuitPython does have the, 294 00:18:07,340 --> 00:18:07,760 if you're doing CircuitPython, 295 00:18:08,440 --> 00:18:10,180 CircuitPython has the ability to open up 296 00:18:11,180 --> 00:18:13,220 a second USB serial port, 297 00:18:13,980 --> 00:18:15,520 a second USB CDC channel. 298 00:18:16,060 --> 00:18:18,060 And so you can have your data on that one 299 00:18:18,160 --> 00:18:20,260 and then do the Ripple on the original one. 300 00:18:20,760 --> 00:18:23,080 And then you don't have to worry about disconnecting. 301 00:18:24,120 --> 00:18:26,860 And so next time I'm going down any sort of serious path 302 00:18:26,900 --> 00:18:27,760 where I'm graphing data, 303 00:18:28,000 --> 00:18:32,960 I'll probably turn on the second serial port and use the serial plotter on that than on the 304 00:18:33,310 --> 00:18:34,200 Ripple because I agree. 305 00:18:34,300 --> 00:18:36,700 It's a real pain in the butt to sort of like dance between the two programs. 306 00:18:37,120 --> 00:18:38,980 Yeah, it threw me at first and then it clicked. 307 00:18:39,160 --> 00:18:40,740 Oh, yeah, one serial port at a time. 308 00:18:41,340 --> 00:18:41,960 One serial port. 309 00:18:42,260 --> 00:18:42,420 Sorry. 310 00:18:43,460 --> 00:18:47,520 Yeah, and it's really frustrating too because the Arduino serial plotter is I think one of 311 00:18:47,650 --> 00:18:49,800 the best serial plotters out there. 312 00:18:50,260 --> 00:18:55,600 But unfortunately, the Arduino IDEE is really greedy with the serial port because there's no 313 00:18:55,700 --> 00:18:57,400 explicit connect disconnect button 314 00:18:57,980 --> 00:18:59,220 because it's trying to be kind of friendly 315 00:18:59,720 --> 00:19:01,360 like oh once you've got the board configured 316 00:19:01,900 --> 00:19:03,120 if there's a serial port there 317 00:19:03,520 --> 00:19:04,400 I'm going to connect to it for you. 318 00:19:07,860 --> 00:19:08,540 It's like no. 319 00:19:09,980 --> 00:19:11,160 I'll make sure to link to the download 320 00:19:11,560 --> 00:19:13,380 for serial plaster in the show notes as well. 321 00:19:14,020 --> 00:19:15,600 Oh yeah, yeah. I've not updated it in a while 322 00:19:15,700 --> 00:19:17,160 but it should still work great. 323 00:19:17,980 --> 00:19:20,220 There's pre-built versions for Mac Windows and Linux 324 00:19:20,600 --> 00:19:22,420 and yeah, if anybody has any questions 325 00:19:22,980 --> 00:19:25,460 about it or has any suggestions on how to improve it, 326 00:19:25,520 --> 00:19:25,760 Let me know. 327 00:19:26,440 --> 00:19:30,760 So you just opened a store on small run.net where you sell since running CircuitPython. 328 00:19:32,600 --> 00:19:34,240 It's been a couple of years since you've been on the show. 329 00:19:34,940 --> 00:19:38,520 Have you been working on any new hardware to add to the store in the near future? 330 00:19:40,040 --> 00:19:40,620 Yes and no. 331 00:19:41,120 --> 00:19:44,960 Yes, I've been building many, many little random boards over the last couple of years. 332 00:19:45,500 --> 00:19:49,220 But no, I don't really have any new ones, I think, for the last time we talked. 333 00:19:50,180 --> 00:19:51,760 There's one that is really close. 334 00:19:52,000 --> 00:19:54,920 And Cooper, who I think, has, has Cooper been on the show? 335 00:19:55,060 --> 00:19:55,640 A couple of times. 336 00:19:55,800 --> 00:19:57,900 Yeah, Cooper Dalrymple. 337 00:19:58,200 --> 00:20:00,160 He's really good with doing synthesizer stuff. 338 00:20:00,580 --> 00:20:10,620 And he wrote a really nice library for this work in progress scent that I have that I'm calling Synthiota, which if you're watching this on video, you can see a little prototype of it. 339 00:20:11,000 --> 00:20:20,600 And it's a little synthesizer thing with 16 touch pads with LEDs and eight knobs and some sliders and a display and a good high quality stereo DAC output. 340 00:20:21,200 --> 00:20:23,380 And it's driven by a PICO or PICO, too. 341 00:20:24,060 --> 00:20:26,120 That all sits inside of a little 3D printers enclosure. 342 00:20:27,680 --> 00:20:29,160 And it's pretty cool. 343 00:20:29,880 --> 00:20:32,380 Cooper's library for it makes it really easy to get going. 344 00:20:33,060 --> 00:20:39,300 One of the things that's been sticking on me is that I've been working on trying to make some good synth engines that I like. 345 00:20:40,020 --> 00:20:50,480 Like one of the ones that I did a couple of months ago was this TB303 inspired one that hopefully might end up being used in an ATAFruit, used by ATAFruit at some point. 346 00:20:52,160 --> 00:21:04,500 But the TV3 is like this very squelchy bass sound that was used a lot in acid, acid music, I guess, back in like the 90s and 2000s, sort of the burbally synthetized stuff. 347 00:21:05,550 --> 00:21:18,780 So trying to do that in synthio, the synth engine inside of CircuitPython was a bit of a fun challenge because of the troubles of making digital algorithms sound like analog circuits. 348 00:21:19,640 --> 00:21:19,840 Sure. 349 00:21:21,460 --> 00:21:24,540 But yeah, so probably the next thing that will be on the stores, 350 00:21:24,940 --> 00:21:28,060 both Small Run and maybe Tendi, is the synth iota board, 351 00:21:28,360 --> 00:21:29,540 which I think is a lot of fun. 352 00:21:30,040 --> 00:21:31,140 We'll have to keep an eye out for that. 353 00:21:32,760 --> 00:21:34,360 Tod, thanks so much for coming back on the show. 354 00:21:35,120 --> 00:21:35,900 Oh, thanks for having me, man. 355 00:21:35,980 --> 00:21:37,220 It's always fun to talk CircuitPython stuff. 356 00:21:38,800 --> 00:21:40,740 Thank you for listening to T CircuitPython show. 357 00:21:41,100 --> 00:21:44,080 You can learn more about Tod at his website, todbot.com, 358 00:21:44,500 --> 00:21:47,840 or listen to him on the bootloader podcast at the bootloader.net. 359 00:21:48,520 --> 00:21:52,680 For show notes and transcripts, visit www.CircuitPythonshow.com. 360 00:21:53,260 --> 00:21:55,100 Until next time, stay positive.