1 00:00:00,000 --> 00:00:01,520 [MUSIC PLAYING] 2 00:00:01,520 --> 00:00:03,480 Welcome to the Circuit Python Show. 3 00:00:03,480 --> 00:00:05,440 I'm your host, Paul Cutler. 4 00:00:05,440 --> 00:00:07,640 This episode, I'm joined by Jan Goolsbey. 5 00:00:07,640 --> 00:00:10,080 After a long and varied career in information technology 6 00:00:10,080 --> 00:00:12,520 for a large research laboratory, Jan 7 00:00:12,520 --> 00:00:15,360 became refocused on his first love, electronics hardware 8 00:00:15,360 --> 00:00:17,360 design, and all the things that go with it. 9 00:00:17,360 --> 00:00:19,820 He is an active member of the Circuit Python community, 10 00:00:19,820 --> 00:00:22,240 enjoying learning new ideas and concepts. 11 00:00:22,240 --> 00:00:24,780 His current project direction involves music and sound 12 00:00:24,780 --> 00:00:26,680 synthesis, but is easily distracted 13 00:00:26,680 --> 00:00:30,640 by robotics, sensors, and anything noisy that blinks. 14 00:00:30,640 --> 00:00:32,480 Jan, welcome to the show. 15 00:00:32,480 --> 00:00:32,980 Hey, Paul. 16 00:00:32,980 --> 00:00:33,800 How are you? 17 00:00:33,800 --> 00:00:34,320 I'm great. 18 00:00:34,320 --> 00:00:35,680 Thanks for coming on. 19 00:00:35,680 --> 00:00:39,240 How did you first get started with computers and electronics? 20 00:00:39,240 --> 00:00:43,560 Well, I started with electronics first before computers. 21 00:00:43,560 --> 00:00:45,840 Oh, god, I can't remember how many years ago. 22 00:00:45,840 --> 00:00:48,480 Just a seventh grade kind of child, 23 00:00:48,480 --> 00:00:50,920 and I was very interested in electronics 24 00:00:50,920 --> 00:00:52,880 because I don't know why. 25 00:00:52,880 --> 00:00:54,960 Some fascinating elements of that. 26 00:00:54,960 --> 00:00:57,040 And I started to take things apart. 27 00:00:57,040 --> 00:00:59,240 That was my introduction into electronics. 28 00:00:59,240 --> 00:01:01,920 And back when I grew up-- and I'm an older kind of a guy, 29 00:01:01,920 --> 00:01:05,960 so back then, there really weren't any computers around. 30 00:01:05,960 --> 00:01:08,240 And so if you were going to do things in electronics, 31 00:01:08,240 --> 00:01:10,240 it was all about radio and television. 32 00:01:10,240 --> 00:01:13,440 Those are the big things-- audio, radio, television. 33 00:01:13,440 --> 00:01:16,640 I got started by going down to one of the local electric shops 34 00:01:16,640 --> 00:01:20,160 that did TV repair, and I grabbed these old broken TV 35 00:01:20,160 --> 00:01:24,120 sets that they have, and I gleaned them for their parts. 36 00:01:24,120 --> 00:01:26,040 And from that, I would build circuits, 37 00:01:26,040 --> 00:01:30,680 and it started to build into a habit of mine 38 00:01:30,680 --> 00:01:33,360 to tear things down and figure out how they work 39 00:01:33,360 --> 00:01:35,200 and use that to build other things. 40 00:01:35,200 --> 00:01:37,720 And so I got started in electronics then. 41 00:01:37,720 --> 00:01:40,840 Computers are a little bit different because, like I said, 42 00:01:40,840 --> 00:01:42,840 the computers really weren't very prevalent 43 00:01:42,840 --> 00:01:44,040 when I was growing up. 44 00:01:44,040 --> 00:01:45,920 But when I was in high school-- 45 00:01:45,920 --> 00:01:47,400 I was a junior in high school-- 46 00:01:47,400 --> 00:01:51,120 my physics teacher said, I've got all these parts 47 00:01:51,120 --> 00:01:52,760 that the telephone company gave us. 48 00:01:52,760 --> 00:01:55,160 Can you build a computer from those? 49 00:01:55,160 --> 00:01:58,440 And I thought, well, I certainly can give it a shot. 50 00:01:58,440 --> 00:02:02,520 So I built my first relay digital computer back 51 00:02:02,520 --> 00:02:05,280 when I was about 16, 17 years old. 52 00:02:05,280 --> 00:02:08,160 And a couple of years later, when I was in college, 53 00:02:08,160 --> 00:02:11,000 I started to build from TTL circuits 54 00:02:11,000 --> 00:02:12,920 and put together a computer from that. 55 00:02:12,920 --> 00:02:15,040 And then I went through the cycle 56 00:02:15,040 --> 00:02:17,920 and computers became a lot more prevalent. 57 00:02:17,920 --> 00:02:20,960 I learned how to program in BASIC and a few other things. 58 00:02:20,960 --> 00:02:23,920 But I've always been focused on the hardware side of it. 59 00:02:23,920 --> 00:02:26,520 How did you discover CircuitPython? 60 00:02:26,520 --> 00:02:27,880 Well, that was interesting. 61 00:02:27,880 --> 00:02:30,600 I had a couple of projects, robotics projects. 62 00:02:30,600 --> 00:02:32,240 One was a string car. 63 00:02:32,240 --> 00:02:36,080 And the string car experience is something 64 00:02:36,080 --> 00:02:38,280 that is kind of embedded in our family. 65 00:02:38,280 --> 00:02:40,440 And I won't go into too much detail. 66 00:02:40,440 --> 00:02:42,800 You might have some other questions about the string car 67 00:02:42,800 --> 00:02:44,560 a little bit later, right? 68 00:02:44,560 --> 00:02:45,440 That's right. 69 00:02:45,440 --> 00:02:48,200 I wanted to build this robot string car. 70 00:02:48,200 --> 00:02:51,080 And I was using TTL circuits for that. 71 00:02:51,080 --> 00:02:52,760 And then somebody said-- 72 00:02:52,760 --> 00:02:54,600 and I don't remember who it was-- 73 00:02:54,600 --> 00:02:57,320 hey, there's this thing called a microcontroller. 74 00:02:57,320 --> 00:02:59,560 And of course, I knew what they were from my work 75 00:02:59,560 --> 00:03:00,480 in electronics. 76 00:03:00,480 --> 00:03:03,520 And they said, you can buy these things from Adafruit. 77 00:03:03,520 --> 00:03:06,640 And you could use that to control this robot 78 00:03:06,640 --> 00:03:08,040 that you're trying to build. 79 00:03:08,040 --> 00:03:12,080 So I got involved with Arduino on a trinket. 80 00:03:12,080 --> 00:03:15,280 And oh, Anne Burrell wrote a fantastic book 81 00:03:15,280 --> 00:03:17,840 about how to get started with the trinket. 82 00:03:17,840 --> 00:03:20,480 And that got me involved in that. 83 00:03:20,480 --> 00:03:26,760 And then Tony DeCola wrote an article about MicroPython. 84 00:03:26,760 --> 00:03:28,960 And that was before CircuitPython came out. 85 00:03:28,960 --> 00:03:32,840 So I started to transition all of my robots 86 00:03:32,840 --> 00:03:36,320 over to MicroPython and learn a little bit about that. 87 00:03:36,320 --> 00:03:40,640 And when CircuitPython came along, I was ready to go. 88 00:03:40,640 --> 00:03:42,400 MicroPython was great. 89 00:03:42,400 --> 00:03:45,760 CircuitPython was even simpler, easier to learn. 90 00:03:45,760 --> 00:03:48,280 And although it's slower than Arduino, 91 00:03:48,280 --> 00:03:51,880 it worked fine for the robots and projects that I had. 92 00:03:51,880 --> 00:03:54,720 CircuitPython has the official CircuitPython bundle 93 00:03:54,720 --> 00:03:56,200 maintained by Adafruit. 94 00:03:56,200 --> 00:03:57,960 But there's also the community bundle, 95 00:03:57,960 --> 00:04:00,800 which includes over 100 drivers and helper libraries created 96 00:04:00,800 --> 00:04:02,600 by members of the community. 97 00:04:02,600 --> 00:04:05,000 You've contributed over 20 libraries to the bundle. 98 00:04:05,000 --> 00:04:08,400 What are some of your favorite libraries you've created? 99 00:04:08,400 --> 00:04:10,480 You know, I get excited about the bundle. 100 00:04:10,480 --> 00:04:13,360 And before I list a couple of my favorites, 101 00:04:13,360 --> 00:04:17,480 I'd like to share just how important I think the bundle is. 102 00:04:17,480 --> 00:04:23,320 Because when you're working with the CircuitPython community, 103 00:04:23,320 --> 00:04:26,720 you find ample opportunities to learn and share. 104 00:04:26,720 --> 00:04:30,320 And really, that's the energy behind CircuitPython 105 00:04:30,320 --> 00:04:32,360 is about the community. 106 00:04:32,360 --> 00:04:34,960 So the community bundle is just a natural extension 107 00:04:34,960 --> 00:04:38,200 of what's already going on in the CircuitPython community. 108 00:04:38,200 --> 00:04:39,440 And that's sharing. 109 00:04:39,440 --> 00:04:42,440 So when I discovered that there was a bundle of things 110 00:04:42,440 --> 00:04:44,640 that people out there had put together 111 00:04:44,640 --> 00:04:49,200 based on their own projects, I got kind of excited about that. 112 00:04:49,200 --> 00:04:51,160 And I started looking through those. 113 00:04:51,160 --> 00:04:54,840 And since I'm kind of a lifelong learner anyway, 114 00:04:54,840 --> 00:04:58,560 and I'm not that strong of a Python programmer, 115 00:04:58,560 --> 00:05:00,520 the community bundle gave me an opportunity 116 00:05:00,520 --> 00:05:04,080 to look at how other people did things with CircuitPython. 117 00:05:04,080 --> 00:05:07,760 And I picked up so many hints and tricks and ways 118 00:05:07,760 --> 00:05:10,040 to approach things that the bundle just 119 00:05:10,040 --> 00:05:12,480 was kind of this natural focus for me for a while. 120 00:05:12,480 --> 00:05:14,080 It's a hidden gem. 121 00:05:14,080 --> 00:05:16,080 And a lot of people don't understand 122 00:05:16,080 --> 00:05:18,120 that it exists out there. 123 00:05:18,120 --> 00:05:21,880 And it could be used not just to apply directly to a project, 124 00:05:21,880 --> 00:05:23,560 but also used for learning. 125 00:05:23,560 --> 00:05:25,680 And that's how I used it initially. 126 00:05:25,680 --> 00:05:28,240 As I was building projects, I'd come up 127 00:05:28,240 --> 00:05:29,840 with a novel way of doing something, 128 00:05:29,840 --> 00:05:32,600 at least I thought was a novel way of doing things. 129 00:05:32,600 --> 00:05:37,120 I would put together a helper or a driver or something. 130 00:05:37,120 --> 00:05:40,840 And I thought, I really need to contribute back 131 00:05:40,840 --> 00:05:42,240 to the community. 132 00:05:42,240 --> 00:05:47,480 So I learned how to convert that helper into something that 133 00:05:47,480 --> 00:05:50,640 was community bundle compatible. 134 00:05:50,640 --> 00:05:53,720 It's like getting an idea ready to be a product. 135 00:05:53,720 --> 00:05:57,680 I had to learn not just how to get things done for my projects, 136 00:05:57,680 --> 00:05:59,680 but also how to present them in a way 137 00:05:59,680 --> 00:06:01,480 that other people could learn from them. 138 00:06:01,480 --> 00:06:06,120 And so the community bundle taught me a lot about not just 139 00:06:06,120 --> 00:06:09,080 how to write Python, but also how to share it. 140 00:06:09,080 --> 00:06:12,000 My most favorite one was my first one. 141 00:06:12,000 --> 00:06:15,400 And it's this thing called a range slicer. 142 00:06:15,400 --> 00:06:20,320 I had a particular problem in my EuroRack system 143 00:06:20,320 --> 00:06:24,720 where I needed to quantize a linear signal, an analog 144 00:06:24,720 --> 00:06:25,680 signal. 145 00:06:25,680 --> 00:06:30,480 And like when you're turning a knob on a potentiometer, 146 00:06:30,480 --> 00:06:32,680 you expect the potentiometer voltage 147 00:06:32,680 --> 00:06:37,000 to rise slowly and accurately so that you 148 00:06:37,000 --> 00:06:39,640 can use that for controlling a tone or a filter 149 00:06:39,640 --> 00:06:42,040 or some other setting, something musical. 150 00:06:42,040 --> 00:06:43,640 But I found out the potentiometers 151 00:06:43,640 --> 00:06:44,560 are pretty noisy. 152 00:06:44,560 --> 00:06:48,000 As you turn them up, and if you stop at a certain point, 153 00:06:48,000 --> 00:06:50,600 they'll still continue to wiggle their value. 154 00:06:50,600 --> 00:06:53,680 And they're not as stable as you expect them to be. 155 00:06:53,680 --> 00:06:55,240 They're mechanical. 156 00:06:55,240 --> 00:06:57,440 And so the range slicer is something 157 00:06:57,440 --> 00:07:02,280 that I use to smooth out the way that a potentiometer works. 158 00:07:02,280 --> 00:07:03,960 And there are a couple of ways to do that. 159 00:07:03,960 --> 00:07:06,120 One is to run it through a filter, 160 00:07:06,120 --> 00:07:08,080 but that kind of slows it down. 161 00:07:08,080 --> 00:07:11,000 So I had to find a way that it used something 162 00:07:11,000 --> 00:07:12,440 called hysteresis. 163 00:07:12,440 --> 00:07:16,440 It determines the direction that the potentiometer is moving. 164 00:07:16,440 --> 00:07:19,040 And it waits until it gets to a certain point to say, hey, 165 00:07:19,040 --> 00:07:21,720 this is the value that you want, and it's stable. 166 00:07:21,720 --> 00:07:23,920 If you move the potentiometer up a little bit 167 00:07:23,920 --> 00:07:26,660 or down a little bit, that value stays rock stable. 168 00:07:26,660 --> 00:07:29,160 If you move it a little bit further down, 169 00:07:29,160 --> 00:07:32,080 then it jumps to the next stable value. 170 00:07:32,080 --> 00:07:36,280 So range slicer was really great for quantizing voltages 171 00:07:36,280 --> 00:07:39,840 into musical notes and to filter settings and things like that. 172 00:07:39,840 --> 00:07:42,000 So yeah, range slicer was my first one. 173 00:07:42,000 --> 00:07:43,880 That was a whole lot of fun to do. 174 00:07:43,880 --> 00:07:46,600 Recently, I've been working on graphics libraries 175 00:07:46,600 --> 00:07:48,120 for the community bundle. 176 00:07:48,120 --> 00:07:49,760 Palette fader, that's one. 177 00:07:49,760 --> 00:07:51,360 Palette filter is another one. 178 00:07:51,360 --> 00:07:53,320 And palette fader was interesting 179 00:07:53,320 --> 00:07:57,080 because it came out of kind of a moment of desperation. 180 00:07:57,080 --> 00:07:58,600 I had a matrix portal. 181 00:07:58,600 --> 00:08:02,120 I wanted to put a holiday display on the matrix portal. 182 00:08:02,120 --> 00:08:05,560 And when I first turned it on, it drew so much power. 183 00:08:05,560 --> 00:08:07,360 It was so bright. 184 00:08:07,360 --> 00:08:09,920 And it drew so much power that it just shut itself off. 185 00:08:09,920 --> 00:08:12,880 And a lot of folks that have worked with the matrix portal 186 00:08:12,880 --> 00:08:15,260 know exactly what I'm talking about. 187 00:08:15,260 --> 00:08:17,620 So I needed something that could control 188 00:08:17,620 --> 00:08:19,280 the brightness of that initial image 189 00:08:19,280 --> 00:08:22,160 before it shut down the microcontroller. 190 00:08:22,160 --> 00:08:25,080 And palette fader came out of that experience. 191 00:08:25,080 --> 00:08:27,640 And really, palette fader is pretty simple. 192 00:08:27,640 --> 00:08:30,560 Getting to the point of putting it into a library 193 00:08:30,560 --> 00:08:32,800 and understanding how it worked, that was the hard part. 194 00:08:32,800 --> 00:08:36,640 But palette fader, like I said, is one of my more favorite ones 195 00:08:36,640 --> 00:08:40,380 because it just looks at the palette of the image, 196 00:08:40,380 --> 00:08:42,220 and it just scales down the values 197 00:08:42,220 --> 00:08:43,560 so they're not as bright. 198 00:08:43,560 --> 00:08:48,600 It scales down all three of the RGB values at the same time. 199 00:08:48,600 --> 00:08:50,640 And that's really how that works. 200 00:08:50,640 --> 00:08:53,440 So that's one of my favorites. 201 00:08:53,440 --> 00:08:57,040 I might say I have 20 favorites, but they were all 202 00:08:57,040 --> 00:09:00,680 used in a project, and they all seemed very useful to me. 203 00:09:00,680 --> 00:09:02,160 And that's why I shared them. 204 00:09:02,160 --> 00:09:04,720 The great thing about the community bundle 205 00:09:04,720 --> 00:09:06,980 is that once you share it, you start 206 00:09:06,980 --> 00:09:09,040 getting feedback from people. 207 00:09:09,040 --> 00:09:13,680 So palette fader, for example, I've received a lot of feedback 208 00:09:13,680 --> 00:09:20,640 and have improved in my ability to program in Circuit Python 209 00:09:20,640 --> 00:09:24,160 and also how to write drivers and libraries and stuff 210 00:09:24,160 --> 00:09:26,600 to share with people because of that. 211 00:09:26,600 --> 00:09:28,140 What advice would you offer to someone 212 00:09:28,140 --> 00:09:30,560 looking to add a driver or library to the community 213 00:09:30,560 --> 00:09:31,520 bundle? 214 00:09:31,520 --> 00:09:33,320 My advice is it's very simple. 215 00:09:33,320 --> 00:09:37,720 It's that you're probably doing something that can be shared. 216 00:09:37,720 --> 00:09:39,760 If you're working on a project and you 217 00:09:39,760 --> 00:09:44,000 have a particular approach to solve a fairly unique problem, 218 00:09:44,000 --> 00:09:46,480 like you're trying to get rid of noise on a potentiometer 219 00:09:46,480 --> 00:09:49,120 or something like that, you can rest assured 220 00:09:49,120 --> 00:09:51,480 that somebody else is having that same issue 221 00:09:51,480 --> 00:09:53,640 or they're looking for some advice 222 00:09:53,640 --> 00:09:56,800 on how to approach solving that problem. 223 00:09:56,800 --> 00:09:59,000 You're likely to already have something 224 00:09:59,000 --> 00:10:01,280 in your code that is shareable. 225 00:10:01,280 --> 00:10:03,640 So I'd say find something that you think 226 00:10:03,640 --> 00:10:06,400 is unique that somebody else could use 227 00:10:06,400 --> 00:10:08,200 and share it through the community bundle. 228 00:10:08,200 --> 00:10:11,320 There are some particular ways of doing that because there 229 00:10:11,320 --> 00:10:14,480 are standards that have been put into place to make sure 230 00:10:14,480 --> 00:10:17,520 that the code always functions and that it's readable 231 00:10:17,520 --> 00:10:18,840 and those kinds of things. 232 00:10:18,840 --> 00:10:21,140 There are learning guides and there are people like me 233 00:10:21,140 --> 00:10:22,440 that can help out. 234 00:10:22,440 --> 00:10:24,960 But I'd say getting started putting something 235 00:10:24,960 --> 00:10:27,400 in a community bundle is very easy because you're already 236 00:10:27,400 --> 00:10:28,680 doing it. 237 00:10:28,680 --> 00:10:31,000 Synth.io was one of the highlights of Circuit Python 238 00:10:31,000 --> 00:10:32,320 in 2023. 239 00:10:32,320 --> 00:10:34,760 Tell me about the IoT Wind Chimes project 240 00:10:34,760 --> 00:10:37,840 that you did earlier this year using Synth.io. 241 00:10:37,840 --> 00:10:39,800 I love Synth.io. 242 00:10:39,800 --> 00:10:43,640 I am so impressed with Synth.io because coming 243 00:10:43,640 --> 00:10:47,800 from a musical background and working in the EuroRack 244 00:10:47,800 --> 00:10:51,880 and designing my own analog circuits to get sounds out, 245 00:10:51,880 --> 00:10:54,320 something as simple as Circuit Python that 246 00:10:54,320 --> 00:10:58,160 has a layer in there that's for generating oscillators 247 00:10:58,160 --> 00:10:58,720 and-- 248 00:10:58,720 --> 00:10:59,840 I love Synth.io. 249 00:10:59,840 --> 00:11:00,600 I just love it. 250 00:11:00,600 --> 00:11:03,080 I could go on. 251 00:11:03,080 --> 00:11:08,360 So the Wind Chimes project is an interesting one. 252 00:11:08,360 --> 00:11:10,480 I used to say, well, I have a problem. 253 00:11:10,480 --> 00:11:13,520 My problem is-- my wife and I have this problem. 254 00:11:13,520 --> 00:11:16,360 We collect wind chimes and they're out on the back patio 255 00:11:16,360 --> 00:11:18,520 on the other side of our house. 256 00:11:18,520 --> 00:11:21,320 We love them because we're both very musical 257 00:11:21,320 --> 00:11:24,920 and we love having soundtrack going all the time. 258 00:11:24,920 --> 00:11:28,880 But the thing is, we also listen to them at night 259 00:11:28,880 --> 00:11:31,320 to gauge what the weather is doing outside. 260 00:11:31,320 --> 00:11:34,960 We live in the desert of Washington state. 261 00:11:34,960 --> 00:11:37,680 That's my preface to say wind chimes are important to us 262 00:11:37,680 --> 00:11:41,280 because they tell us when the wind is going to start blowing 263 00:11:41,280 --> 00:11:42,960 or when it has started blowing. 264 00:11:42,960 --> 00:11:44,960 And we can gauge the speed of the wind 265 00:11:44,960 --> 00:11:48,360 by the character of the wind chimes. 266 00:11:48,360 --> 00:11:50,800 But unfortunately, in my office, I 267 00:11:50,800 --> 00:11:52,440 can't hear the wind chimes. 268 00:11:52,440 --> 00:11:55,520 So the IoT Wind Chimes project was 269 00:11:55,520 --> 00:11:59,640 one where I wanted to hear the chimes in my office 270 00:11:59,640 --> 00:12:02,720 and wanted it to be linked to the wind speed outdoors 271 00:12:02,720 --> 00:12:06,240 so I could gauge how fast the wind was blowing. 272 00:12:06,240 --> 00:12:10,000 We get-- by the way, wind storms around here 273 00:12:10,000 --> 00:12:14,200 can become surprising in a number of ways. 274 00:12:14,200 --> 00:12:17,440 We can get trampolines coming over the fence. 275 00:12:17,440 --> 00:12:20,880 We can see trash cans blowing down the street. 276 00:12:20,880 --> 00:12:26,560 I've even encountered a metal lawn shed coming over the fence 277 00:12:26,560 --> 00:12:29,040 and sticking to the front of the house. 278 00:12:29,040 --> 00:12:30,480 Oh my goodness. 279 00:12:30,480 --> 00:12:32,480 We've had some-- so wind is something 280 00:12:32,480 --> 00:12:34,160 that we think about a lot here. 281 00:12:34,160 --> 00:12:37,280 And the wind chimes project is one way of doing that. 282 00:12:37,280 --> 00:12:39,760 The fun part about that wind chimes project 283 00:12:39,760 --> 00:12:44,760 was I used an ESP32S2 for it, which is a fantastic board. 284 00:12:44,760 --> 00:12:47,960 I mean, it's one of my go-to boards 285 00:12:47,960 --> 00:12:51,120 now when I'm doing musical things because it's fast. 286 00:12:51,120 --> 00:12:53,040 And if I need an internet connection, 287 00:12:53,040 --> 00:12:55,160 it's got the internet connection. 288 00:12:55,160 --> 00:12:58,120 And so it was perfect for the IoT Wind Chimes project 289 00:12:58,120 --> 00:13:00,880 because it could hold all of the musical notes 290 00:13:00,880 --> 00:13:02,440 that I needed it to hold. 291 00:13:02,440 --> 00:13:05,600 It could calculate the overtones that I 292 00:13:05,600 --> 00:13:09,200 wanted to calculate to get that realistic chime sound. 293 00:13:09,200 --> 00:13:13,160 The ESP32S2 was perfect for the project because of the fact 294 00:13:13,160 --> 00:13:15,520 that it had the memory, and it had the speed, 295 00:13:15,520 --> 00:13:17,000 and it had the internet connection 296 00:13:17,000 --> 00:13:18,240 that I'd need for that. 297 00:13:18,240 --> 00:13:20,840 And then throwing synth I/O on top of that, 298 00:13:20,840 --> 00:13:25,000 I did something kind of organic to get the chime sound. 299 00:13:25,000 --> 00:13:30,480 Because chimes are-- it goes back to physics and mechanics. 300 00:13:30,480 --> 00:13:33,000 When you think about how a wind chime works, 301 00:13:33,000 --> 00:13:35,120 it's a tube that vibrates. 302 00:13:35,120 --> 00:13:37,160 But wind chimes don't vibrate using 303 00:13:37,160 --> 00:13:38,840 the standard scientific model. 304 00:13:38,840 --> 00:13:40,960 There's actually a little bit more to it than that. 305 00:13:40,960 --> 00:13:43,560 They have overtones that are related to the type of metal 306 00:13:43,560 --> 00:13:46,480 that it is, the striker that hits it, 307 00:13:46,480 --> 00:13:50,120 and the pattern of the music is also-- 308 00:13:50,120 --> 00:13:53,320 it's periodic and predictable in physics. 309 00:13:53,320 --> 00:13:55,680 Usually wind chimes are arranged in a circle, 310 00:13:55,680 --> 00:13:59,480 and the striker travels in portions of a circle. 311 00:13:59,480 --> 00:14:01,560 That's what made that project a lot of fun 312 00:14:01,560 --> 00:14:04,240 was that I could take some time and look 313 00:14:04,240 --> 00:14:06,280 at the physics of what it would take 314 00:14:06,280 --> 00:14:09,160 to make an accurate chime sound and then figure out 315 00:14:09,160 --> 00:14:10,840 how the notes would play. 316 00:14:10,840 --> 00:14:13,280 Synth I/O was perfect for that. 317 00:14:13,280 --> 00:14:15,640 You mentioned it earlier, but one of the first projects 318 00:14:15,640 --> 00:14:17,560 you ever shared on the Adafruit Learn system 319 00:14:17,560 --> 00:14:18,880 was the String Car Racer. 320 00:14:18,880 --> 00:14:20,800 What is the String Car Racer? 321 00:14:20,800 --> 00:14:22,880 The String Car Racer is a-- 322 00:14:22,880 --> 00:14:25,440 well, let me go back in history first. 323 00:14:25,440 --> 00:14:27,640 Because I didn't invent the String Car. 324 00:14:27,640 --> 00:14:29,880 My brother invented the String Car. 325 00:14:29,880 --> 00:14:32,200 He's a mechanical genius, I swear. 326 00:14:32,200 --> 00:14:35,840 And he put together this idea that if you take an old DC 327 00:14:35,840 --> 00:14:38,760 motor and hang a battery from it, put a pulley on it-- 328 00:14:38,760 --> 00:14:41,040 because the motor already had the pulley on it-- 329 00:14:41,040 --> 00:14:42,480 if you stick it on a string, it's 330 00:14:42,480 --> 00:14:45,080 going to shoot down this tight string. 331 00:14:45,080 --> 00:14:47,680 At our house, when we were kids, we 332 00:14:47,680 --> 00:14:50,000 would run the string from the apple tree in the backyard 333 00:14:50,000 --> 00:14:52,000 to the telephone pole out front. 334 00:14:52,000 --> 00:14:53,960 And that was a couple hundred feet. 335 00:14:53,960 --> 00:14:56,040 And this string car would just zip down there. 336 00:14:56,040 --> 00:14:59,920 And we came up with all sorts of ways to make the pulley bigger, 337 00:14:59,920 --> 00:15:02,840 make it stick on the string better. 338 00:15:02,840 --> 00:15:05,640 How many batteries can you put on it without losing 339 00:15:05,640 --> 00:15:07,680 the tension in the string? 340 00:15:07,680 --> 00:15:10,320 It was a great learning experience for us as kids, 341 00:15:10,320 --> 00:15:13,040 because we got to experiment with all aspects 342 00:15:13,040 --> 00:15:14,600 of the physics around that. 343 00:15:14,600 --> 00:15:16,120 So that's how the String Car started. 344 00:15:16,120 --> 00:15:18,160 It was a single motor, single battery, 345 00:15:18,160 --> 00:15:19,760 hung on the string by its pulley. 346 00:15:19,760 --> 00:15:21,160 And it would shoot down there. 347 00:15:21,160 --> 00:15:23,080 And if you weren't down at the telephone pole 348 00:15:23,080 --> 00:15:24,880 when it got down there, it would crash. 349 00:15:24,880 --> 00:15:26,480 And we'd have to repair it. 350 00:15:26,480 --> 00:15:29,160 And that gave us an opportunity to improve it. 351 00:15:29,160 --> 00:15:30,800 That's where the String Car came from. 352 00:15:30,800 --> 00:15:33,840 And so we were always trying to figure out better ways 353 00:15:33,840 --> 00:15:35,720 to make the String Car go down and back. 354 00:15:35,720 --> 00:15:41,560 And getting the String Car to reverse when it gets to the end 355 00:15:41,560 --> 00:15:44,000 meant we could save the life of the String Car. 356 00:15:44,000 --> 00:15:45,400 That was kind of important. 357 00:15:45,400 --> 00:15:48,400 We didn't want to keep building over and over and over. 358 00:15:48,400 --> 00:15:49,400 Let's fast forward. 359 00:15:49,400 --> 00:15:51,840 We built these simple String Cars. 360 00:15:51,840 --> 00:15:54,000 We didn't really have any formal rules or anything. 361 00:15:54,000 --> 00:15:56,120 But we tried to keep them simple. 362 00:15:56,120 --> 00:15:57,640 We used repurposed parts. 363 00:15:57,640 --> 00:15:59,600 We'd get our motors from places. 364 00:15:59,600 --> 00:16:02,200 We'd build the chassis out of fence wire 365 00:16:02,200 --> 00:16:03,800 or whatever we had in hand. 366 00:16:03,800 --> 00:16:06,680 And we just tried to keep it simple. 367 00:16:06,680 --> 00:16:12,280 It wasn't until I was getting ready to retire from my career. 368 00:16:12,280 --> 00:16:15,560 And I decided I need to work on some of these old family 369 00:16:15,560 --> 00:16:16,560 projects again. 370 00:16:16,560 --> 00:16:18,880 I got my brother interested, which is really great. 371 00:16:18,880 --> 00:16:23,200 And I built some String Cars around the Trinket, 372 00:16:23,200 --> 00:16:24,240 as I mentioned. 373 00:16:24,240 --> 00:16:30,320 But I wanted to have the String Car be smarter about collisions 374 00:16:30,320 --> 00:16:32,240 so that when it got to the end of the string, 375 00:16:32,240 --> 00:16:33,720 it would reverse and come back. 376 00:16:33,720 --> 00:16:36,440 And so I came up with a design for a String Car. 377 00:16:36,440 --> 00:16:37,920 I don't know how-- 378 00:16:37,920 --> 00:16:39,680 I'm showing one right now. 379 00:16:39,680 --> 00:16:42,560 But if you go to the learning guide 380 00:16:42,560 --> 00:16:44,520 that I wrote on the String Cars, there's 381 00:16:44,520 --> 00:16:47,760 a section in there that talks about the advancements 382 00:16:47,760 --> 00:16:49,920 of the String Car and some of the things that we did. 383 00:16:49,920 --> 00:16:54,320 So there are limit switches on this chassis that determine 384 00:16:54,320 --> 00:16:55,720 when it hits something. 385 00:16:55,720 --> 00:16:58,080 And hopefully, it hits something softly. 386 00:16:58,080 --> 00:17:00,160 It'll reverse directions and go the other way 387 00:17:00,160 --> 00:17:02,560 and do the same kind of a thing. 388 00:17:02,560 --> 00:17:05,280 The String Car evolved into this. 389 00:17:05,280 --> 00:17:06,880 Started with the Trinket. 390 00:17:06,880 --> 00:17:11,120 I came up with a special board that's a custom Circuit Python 391 00:17:11,120 --> 00:17:11,600 board. 392 00:17:11,600 --> 00:17:14,440 And you can find it out there on circuitpython.org. 393 00:17:14,440 --> 00:17:17,720 It's down-- the only person that ever uses 394 00:17:17,720 --> 00:17:19,200 the download for that is me. 395 00:17:19,200 --> 00:17:20,200 But it's out there. 396 00:17:20,200 --> 00:17:23,040 And it's an M0 processor. 397 00:17:23,040 --> 00:17:25,600 But it has all the little sensors and things 398 00:17:25,600 --> 00:17:29,240 that the String Car needs to be able to go forward and reverse. 399 00:17:29,240 --> 00:17:31,800 And it's evolved into-- 400 00:17:31,800 --> 00:17:35,040 now I have a feather wing, so I can plug in any kind of a board 401 00:17:35,040 --> 00:17:36,000 into it. 402 00:17:36,000 --> 00:17:38,040 Right now, it's running an M4 board 403 00:17:38,040 --> 00:17:40,640 because that's floating point. 404 00:17:40,640 --> 00:17:43,440 It can do the calculations that it needs to do. 405 00:17:43,440 --> 00:17:45,880 But I've also run it with a Bluetooth board, 406 00:17:45,880 --> 00:17:48,840 so I can remotely control it and things like that. 407 00:17:48,840 --> 00:17:51,240 The String Car was just a great experience 408 00:17:51,240 --> 00:17:54,520 in discovering physics and eventually learning 409 00:17:54,520 --> 00:17:56,960 how to build some intelligence into it 410 00:17:56,960 --> 00:17:59,320 so that it could be more autonomous. 411 00:17:59,320 --> 00:18:02,320 We didn't require us to catch it when it reached the telephone 412 00:18:02,320 --> 00:18:03,160 pole. 413 00:18:03,160 --> 00:18:06,520 So the String Car was just really a great platform 414 00:18:06,520 --> 00:18:08,200 for learning those kinds of things. 415 00:18:08,200 --> 00:18:10,560 And it continues into-- 416 00:18:10,560 --> 00:18:13,920 even today, when I'm thinking about the physics of how 417 00:18:13,920 --> 00:18:17,200 the robot works, right now, the String Car 418 00:18:17,200 --> 00:18:20,960 is sophisticated enough to know, well, here's how it works. 419 00:18:20,960 --> 00:18:22,800 It goes very slowly down the string 420 00:18:22,800 --> 00:18:25,160 until it encounters a barrier. 421 00:18:25,160 --> 00:18:29,160 And it determines, oh, I know how long the string is now 422 00:18:29,160 --> 00:18:31,360 because it knows how long it took to get there. 423 00:18:31,360 --> 00:18:34,600 And it knows that based on the motor speed and timing. 424 00:18:34,600 --> 00:18:38,520 So now, it can travel backwards towards the start 425 00:18:38,520 --> 00:18:40,400 as fast as it wants to because it 426 00:18:40,400 --> 00:18:42,600 knows when it needs to slow down to keep 427 00:18:42,600 --> 00:18:46,120 from colliding and falling off the string or worse. 428 00:18:46,120 --> 00:18:49,120 So that was a fun experience to go 429 00:18:49,120 --> 00:18:52,880 through the physics of figuring out 430 00:18:52,880 --> 00:18:55,800 without any sensors other than the time, 431 00:18:55,800 --> 00:18:58,480 how long does it take to get down to the end of the string 432 00:18:58,480 --> 00:19:02,080 and keep from colliding and falling off and getting 433 00:19:02,080 --> 00:19:03,080 damaged? 434 00:19:03,080 --> 00:19:05,160 So great experience. 435 00:19:05,160 --> 00:19:06,080 What a great project. 436 00:19:06,080 --> 00:19:08,520 I'll make sure I link to that in the show notes as well. 437 00:19:08,520 --> 00:19:10,160 Speaking of links, if people want 438 00:19:10,160 --> 00:19:13,040 to learn more about your projects, where should they go? 439 00:19:13,040 --> 00:19:16,540 Well, probably the best place to learn about projects 440 00:19:16,540 --> 00:19:19,720 is the Adafruit Learning System and the Adafruit Learning 441 00:19:19,720 --> 00:19:23,320 System Playground because I've been putting more projects 442 00:19:23,320 --> 00:19:25,000 in the Playground area. 443 00:19:25,000 --> 00:19:30,040 I also have a GitHub repository site that is Cedar Grove 444 00:19:30,040 --> 00:19:30,720 Studios. 445 00:19:30,720 --> 00:19:32,680 And you can put the link in the notes. 446 00:19:32,680 --> 00:19:35,160 I put most all of my projects out there-- 447 00:19:35,160 --> 00:19:37,180 printed circuit boards I've designed, 448 00:19:37,180 --> 00:19:41,040 concepts that I've had, and many of the finished projects 449 00:19:41,040 --> 00:19:43,780 to weather stations and some of the other things 450 00:19:43,780 --> 00:19:45,000 that I've worked on. 451 00:19:45,000 --> 00:19:46,780 Playground is a particularly good place 452 00:19:46,780 --> 00:19:51,040 to find not just my projects but other projects that-- 453 00:19:51,040 --> 00:19:54,080 they're not quite finished enough or polished enough 454 00:19:54,080 --> 00:19:56,400 to be a learning guide, but they contain 455 00:19:56,400 --> 00:20:00,160 a core idea about a project that you can learn from. 456 00:20:00,160 --> 00:20:03,920 That's where I put a project about a guitar pedal 457 00:20:03,920 --> 00:20:08,160 that I was trying to repair for a friend of mine. 458 00:20:08,160 --> 00:20:12,040 And I put the details out in the Playground. 459 00:20:12,040 --> 00:20:14,080 I'll make sure I link to that as well. 460 00:20:14,080 --> 00:20:15,600 Last question I ask each guest. 461 00:20:15,600 --> 00:20:17,320 You're about to start a new project. 462 00:20:17,320 --> 00:20:19,560 Which board do you reach for? 463 00:20:19,560 --> 00:20:28,040 Well, most of my projects I try to complete like a product. 464 00:20:28,040 --> 00:20:31,400 So I really like my projects to have a front panel. 465 00:20:31,400 --> 00:20:36,360 And the Pi Portal is this almost perfect front panel. 466 00:20:36,360 --> 00:20:37,900 And it comes in three varieties, so you 467 00:20:37,900 --> 00:20:39,480 get the three different sizes. 468 00:20:39,480 --> 00:20:42,880 So Pi Portal with the M4 processor in it, 469 00:20:42,880 --> 00:20:46,360 and it has an ESP32, that's a great choice 470 00:20:46,360 --> 00:20:47,920 for most of my projects. 471 00:20:47,920 --> 00:20:50,960 And if I think about a project, that's the first one 472 00:20:50,960 --> 00:20:52,600 that I go to probably. 473 00:20:52,600 --> 00:20:58,440 That being said, I kind of like the Pi Badge and the Pi Gamer 474 00:20:58,440 --> 00:21:00,520 because they act like front panels too. 475 00:21:00,520 --> 00:21:05,040 I made a turtle bot where I used a robot that moves around 476 00:21:05,040 --> 00:21:06,720 using the turtle language. 477 00:21:06,720 --> 00:21:10,880 And I put a Pi Gamer on the top of that with a display, 478 00:21:10,880 --> 00:21:12,840 and that became the front panel for the robot. 479 00:21:12,840 --> 00:21:15,760 So front panels, that's my first choice. 480 00:21:15,760 --> 00:21:19,400 But I really discovered the ESP32-S2. 481 00:21:19,400 --> 00:21:24,560 And the RP2040, especially the QDPi version, 482 00:21:24,560 --> 00:21:26,820 is perfect if you're dealing with sensors. 483 00:21:26,820 --> 00:21:28,240 And I love sensors. 484 00:21:28,240 --> 00:21:31,000 If you're trying to do something quick and dirty with a sensor 485 00:21:31,000 --> 00:21:33,360 and you don't want to have to solder a bunch of stuff, 486 00:21:33,360 --> 00:21:35,600 QDPi RP2040 is perfect. 487 00:21:35,600 --> 00:21:37,920 So that's four boards. 488 00:21:37,920 --> 00:21:39,240 That's about the best I could do. 489 00:21:39,240 --> 00:21:41,280 I can't pick just one. 490 00:21:41,280 --> 00:21:42,320 Who can these days? 491 00:21:42,320 --> 00:21:44,240 There's so many great choices out there. 492 00:21:44,240 --> 00:21:46,080 Yeah, yeah, it's fun. 493 00:21:46,080 --> 00:21:48,360 Jan, thanks so much for being on the show. 494 00:21:48,360 --> 00:21:49,160 Oh, you're welcome. 495 00:21:49,160 --> 00:21:50,920 I really enjoyed it. 496 00:21:50,920 --> 00:21:54,560 I have a big passion for working with other people 497 00:21:54,560 --> 00:21:57,600 and learning from what other people do. 498 00:21:57,600 --> 00:21:59,600 And the CircuitPython environment 499 00:21:59,600 --> 00:22:01,120 is just so perfect for that. 500 00:22:01,120 --> 00:22:05,520 Coming on this show and talking to you, it's just been a thrill. 501 00:22:05,520 --> 00:22:07,640 Thanks again. 502 00:22:07,640 --> 00:22:08,920 Thank you for listening. 503 00:22:08,920 --> 00:22:11,280 You can find transcripts in most podcast players, 504 00:22:11,280 --> 00:22:16,240 and show notes are available at www.circuitpythonshow.com. 505 00:22:16,240 --> 00:22:19,280 Until next time, stay positive. 506 00:22:19,280 --> 00:22:21,280 .