So, everyone, if you're just watching this, please check the comments for time code so you can skip around. We're going to take a few minutes here to get going. I was a smidge late having some Wi-Fi issues in the house, so I'm wired in. I should be okay, but may need to poke the Wi-Fi if it's not working. My partner is upstairs on the Wi-Fi, so she's having some troubles with that. So that's why I have my network pane open here. Looks like we're going YouTube, but I don't think I have a restream open. It must be working. I'll say hi in just a second, folks. Get this going, too. Salut, Dexter! All right, let's see. Audio is good, video is good, cat is good. Yep, cat is good. He's actually back in his bed. It's actually starting to get warm enough here that it's like, should I have the window open?  And for those of you who keep track, I've got ice in my glass, too. So hopefully, I was on the Python language summit earlier this week, and the camera actually stopped because it was too hot. So it didn't happen at all last summer, so it should be okay. Let's see who we have in Discord. We have Dylan, Doctor, Dexter, Love the Factory, Fede2, Hugo, DCD, and DCD, thank you for taking notes. Hello, Mr. Certainly. And thanks for relaying to... Latency seems high. I think I said it. I think I'm on the same setting as usual. Yeah, I'm on low latency, so sorry if the latency's a bit worse. I'm not gonna mess with it. If you can hear me and see me, it's totally okay. Alive on Twitch, thank you, Mr. Certainly. Hi, Johnny. Hello, Unexpected Maker. Hello, BiataGraph. Hi, Dave, if I haven't said hi to you. Hey, Timon Skoo. Hi, Bruce. Hi, Paul. Thanks for hanging out. I opened my window and turned on the exhaust fan. Yeah, so if you hear the background noise, I do have a fan over in the corner trying to make it a little cooler in here, but I have shorts on as well. Hi, TJ Berlin. Eight seconds of real time. I could turn it on lower. Johnny got their vaccination on Wednesday, congrats. I get my second dose on Monday and I'm super excited. And howdy, John Summers. Okay, let me do housekeeping. I feel like this is a little lower than it normally is. Sorry, I realize some people have theirs like underneath them. Second shot in six weeks. Hi, Interwebfiend and David Buchanan. Never go back to pants until winter. Yeah, I'm getting there. I just did laundry today too. Hi, Carlos. Okay, so, hello, everyone. My name is Scott. I go by Tan Newt online and I work for Adafruit on CircuitPython. Those are two things you may not know, so let me cover them both. Adafruit is an open source hardware and software company based out of New York City, but I work remotely for them, so I am in Seattle. So that's why I tend to say Pacific Time because that's my time zone. Yes, that's Adafruit. I, CircuitPython, is an open source version of Python designed for microcontrollers, which are these little tiny computers. Come on. Little tiny computers. This one has a CMD-21. This is very tiny. It has 32 kilobytes of RAM, but they're very inexpensive and they're great to start with. So, CircuitPython brings the Python language that folks may know from Linux or whatever, from their real OS down to tiny computers to do sorts of tiny sorts of things. So, let's see. This is, oh, if you want to chat with me and a lot of other people, I recommend joining the Discord. If you're in the YouTube chat or the Twitch chat, like, those are kind of ephemeral, so I recommend everybody join the Twitch chat, which is not the Twitch chat, the Discord chat, because it's around all the time. So, you can do that by going to the URL adafru.it-discord. That's the gray box here as well. Hello, Andrew Reed. Thanks for joining. Hello, Jose Davi. So, yeah, this is a deep dive. It happens every week unless I'm taking a week off, which I have a feeling I will in the summer to be able to go on vacation. It's normally Fridays at 2 p.m. Pacific, but it occasionally shifts to Thursday at 2 p.m. If I'm just going to take Friday off, I'll do that. Next week is on Friday as well. I've got, I get my second vaccination next week, and then it's two weeks after that that I'll be fully vaccinated. So, expect after I'm fully vaccinated to be when I start doing more vacation and stuff. So, that should be good. Typically, it goes for two hours or more, and if you have questions, go ahead and ask them in the chats. I do check both the YouTube and the Discord, and folks can see those on the thing as well. Hello. Oh, Unexpected Maker gets their first dose May 29th. That's awesome. Hello, Ismail. Hello, Yaron and Sadie, and Xenia as well. Hi, John Franco. What's up? Yeah, so that's what this is. If you have questions, I'll try my best to answer them. And, oh, last on the housekeeping is that the kitty here is Spook. He is epileptic. He does have seizures from time to time, but it's rare. So, if I'm just headphones off and not paying attention, just sit tight and we'll, yeah, no more get this. Oh, yeah, I should even say that. But yeah, so if I'm just sit tight, if I'm not talking to the stream, I'll get back to doing that. And there might be, I might need to help with Wi-Fi issues too. We'll see, hopefully now. And then, yeah, I said about next week. So lots to talk about today, I guess. I didn't realize it, but I guess there's lots of different topics. The weeds that we'll get into if we have time is, the status LED updates I did are mostly working, but on the Sandy platforms, they were having some problems. So I'll cover that if I get to it. But first, I want to do a bit of, well, first I should say, MicroPython 115 has been merged in. So it's not in the plans. Sorry, David, but let's talk about this first. So those of you who've been following along, CircuitPython was at 194-ish, and now we're up to date with MicroPython. And I haven't checked today. Let me switch. We can see how many... So we're 116 commits behind MicroPython now, which is amazing, because before this all started, we were over 2,000 away. So that was really good. I did have a meeting. I met with Damian and Jim on Tuesday, Monday, their Tuesday, Monday. And we had some discussion about, like, hey, this is a very rare time for us to be this close, and, like, what should we want to do? And we kind of, like, settled on this idea that what our first goal should be is just to make us share... Have fewer differences just in the Pi directory, which is the directory that includes, like, all of the VM sorts of stuff. So the stuff that actually runs Python is all in that directory. So that's kind of our hope. But yeah. So that's cool. And thanks to those folks, those two for hanging out. And we're going to keep in closer touch, too. I even offered them to come on the show. So hopefully it's, like, Sunday morning. An expected maker can confirm. But in Australia, it's, like, Sunday morning right now. And kind of early. So I offered that up to them as well. Yeah. Love the Factory says, 48 hours after shot, too, to not have to do anything. Yeah, I work from home. Yep, marriage complete. Hello, Wheeling wizard from a Pittsburgh suburb. Tomorrow is 8 o'clock, 18 day. Saturday morning. It's not Sunday. It's Saturday. It's not that far ahead. Big headache for 30 plus hours after my second dose and lots of being sleepy, says Pi autograph. I'll let you know. I didn't have any symptoms for my first Pfizer dose, so. Yeah, so that's where we are on the merge side of things. So I'm basically done with it. I don't think there are any large bugs that we have to track down. Dan also has started a 6-3x branch. So expect to see a 6-3 staple based on a bunch of stuff that Dan cherry picked out. So thanks to Dan for doing that. It's largely just new board definitions because the seven main branches are pretty unstable still. And I do want to get this elite eblink and stuff in, which is the last thing that's kind of on my radar as well. Yeah, I had a sore arm after my first shot, but that was okay. I just couldn't sleep on that side. It's fine. Hello, Minnesota Medtap. Don't worry, we've got plenty of time. Hang out, even though we started a little bit late too, so you're fine. We're just chatting. But yeah, MicroPython 15 verges is in. I know it's kind of late in Europe, so let me show off. So Timon, who I'm probably mispronouncing still even though I've met them. Oh, let me answer this question first, and then we'll go on to Pyonora. So TJ Berlin says, does that mean that you can now get back to be a Lee Scott? And there might be a chance to have ESP32 Circuit Python support sometime not too far in the future. Yeah, so my goal, depending on how the second shot goes, so next week is going to be meetings, shot, and then I'll have a lot of time, but how effective I can work next week depends on how I react to the shot. Now my sister and my parents, they didn't have any problem with their second dose. So I'm kind of hoping that I don't either. Generally, I don't have allergies and things, so I'm kind of expecting it to be no big deal. But yeah, my goal is to get back to the be Lee workflow stuff next week. And I should say that I also did, Trevor and I met with Antonio on Wednesday. Antonio is a contractor person that we work with on occasionally, as on a need basis, right? Antonio does web development for both Android and iOS. So we were talking about collabing with Antonio on building a library for the be Lee file transfer stuff. So I met with Antonio, got that plan going, and that should be the tougher bits of the app side of things. And I got Antonio all set up with the circuit Python demo that I had. So we should be able to get going on the be Lee workflow stuff. I fully need to get back to it. I just feel like this LED thing is looming over me because I want to figure out, well, the LED stuff I want to get in for seven because it's an interface change. And I'm so close, but it's so annoying. And Johnny says, also, how about native CP on the Raspberry Pi? It's crossed my mind. But if you've looked in the notes, you'll notice I'm actually quite busy doing some other stuff that's not hardware related, which I think my brain likes to do it because it's very different than the embedded work that I do for my job. But let's talk about that. So overhead time, well, bam, and let me flip it. I don't think my address is on here. So for those of you who don't know, Timon and I, I feel like the emphasis I say is wrong. I'm sorry, I'm sorry in advance. We met at SuperCon and SuperCon was like fall of 2019 now. We had, yes, it did come in a box, but I got rid of the box because the box has my address on it. So we had a discussion about whether there was this middle world between Raspberry Pi Linux and CircuitPythonLand. And I was arguing that it would be cool to see that gap get narrower. And one of the things that was interesting was this idea of putting a Raspberry Pi in a form factor that a microcontroller typically comes in, particularly in Metro. So when the, I don't know if the Pi 4, were the Pi 4 compute modules out yet? I don't necessarily know if they were, but they did come out and that was a perfect opportunity to do that. So Timon took this idea and ran with it. So I had some hand in like the discussion for it, but Timon deserves all the credit to making something actually happen. I think it's important to recognize that there are so many ideas. It's execution that sets people apart. It's not the ideas themselves. It's a matter of who can actually execute or not on an idea. Yeah, we'll get there. We'll circle back to the ESP compute for was the last year. Yeah, so what were we talking about? Maybe it was just something that we had. Yeah, so Timon's done this awesome work in conjunction with Crowd Supply. So I want to shout out the Crowd Supply folks as well. They're an open hardware company, crowdfunding company, I guess. Think of it as kind of like Kickstarter, but they're experts in hardware. So Crowd Supply, shout out to them. They're in Portland and that's what Payonora is being done through. So I haven't actually opened this yet. I just got it today. Right. Timon says in the chat, you were 100% the inspiration for all this. Thank you. I'm happy and I'm extra happy that you did all of the work to make it a physical thing. It's like ideas are cheap, execution is hard. So thank you again for really making this a thing. I'm super excited and I will at some point get circuit by the running on this. It's a matter of time, not a matter of if. So inside the bag, there's another bag. And I did ask Timon if I could show this off to you. Unfortunately, the campaign is actually finished. So if you want to pick one up, yeah. Oh, yeah, David. So I should say there are beta units that Timon has sent out to a few people. And originally he asked me if I wanted one and I said, well, you know, I have so many dev boards. I don't know when I'll be able to get to it. Like if there's other people that you should get it to, then that's totally cool. I already signed up for the campaign. And Timon says you can still order. So if you want this, I think you'll just get it later than the first batch. Yeah. That's one cool thing about CrowdSupply is that you don't miss it when it's done. They carry it later as well. Awesome.  So I'll just use scissors to do that and go on the floor. Sorry, my desk is a mess. I have like a dozen boards here. So let's see what we've got. Oh, look at that beautiful silk screen. There's a one in here. I'm not sure what the one is for. And yeah, if folks have questions, feel free to drop them in the chat, Timon's in the chat and can answer any questions you have. There is this flat flex cable, which is a same-sided flat flex cable. I think it's just because the, I was reading the beta page. It's because the normal flat flex cable for the Raspberry Pi cameras are usually like one side and each side. So that's why there's a bit different. Looks like there's feet, which I could put on right now or I'll just leave it as is. Because unfortunately, I'm not going to actually play with this immediately. I don't really dislike getting Raspberry Pi's going. So I'm just going to show it off. So that's beautiful silk screen. It looks like it's a dark matte finish. And then I did grab, ah, the number is for me to discern the units. I made photos of every preview unit. Does that mean I got the first one? I got serial number number one. That's pretty awesome. I feel special for that. I should put that. I don't, I like the logo. I think Bleak tracted the logo, right? Kudos to them for that design. So that's one side. And I did, I do have the modules. So we'll pop a module on just to see. So what do we have here? So it's a, so what do we have here? So what we have is, we have the Arduino header.  A micro SD card slot. I think this is the ADC. So yeah, that would make sense. So the, the Raspberry Pi compute module doesn't have analog ADC pins on it. So what Timon did was add an extra chip to do it, which is really neat. And then these two DF-40 connectors, they're, they're Herosie connectors. Those are for the compute module, which sits in here. And then, sorry, I'm trying to watch the chat while I do this. Yeah. The bot's wire here on the preview, I think, is a confusion between the enable pin for the, for the ADC and between the neopixel pin, something like that. I don't remember if it was going to, I don't think it was going to be a same three. Maybe it was just an idea, or maybe it was just like circuit Python on it. So we've got USB-C, USB-A, and then HDMI. HDMI is the thing that's really exciting to me. I think this, the USB-A is for host, and then the type C is what you would treat like a regular micro Python drive. And then there's a, looks like a STEMMA QT, if you're in Adafruit land or a quick connector there. Oh, and there's, this is a slide switch for device or host for the USB side. And there's a neopixel in between there as well. And this says hold for power up during USB boot as well. So that's for if you have an EMC module. And then here's the back, and I'll stop holding it so it can focus. QC pass, which is good. There's an M2 slot here, and I know that Timon's experimented with different stuff there. And I think, yeah, let me look at that. Nice pinout labels, look at that. Labels of pins and a camera connector. And maybe this, one of these is the USB, I think there's a USB chip on here as well for the host. Yeah, so that's a tour of the board. Yeah, M2 PCIe, the crowd supply page, they do show it with some Adafruit modules. Love the STEMMA QT. Let's see. John says that's good. ADC is really needed for some sensors I use. Timon says, yeah, I mixed up the pinouts, noticed the day too late. John likes the logo too, very clean looking, and the poor options nice. Asks any plans for one with NVME support. The USB mux is top right close to the USB connectors. And it supports NVME SSDs. That's amazing. And I did get the unit number one. That is very cool. I'm going to put it on there. I'm not going to cover the logo though because I like the logo. So let's find a spot for it. Maybe right here, I can fit it without covering any of the text. You can do B plus M key NVME SSDs. Yeah, so I feel a little bit bad because as you know, I have lots of stuff I'm doing. But this is something that's been kind of in the back of my mind that I do want to do. So I'll get there. I have the compute module as well. Or add the IO board too. So let's just take a look at what it looks like with a compute module on it. And they use all the same packaging, so I'm not sure what compute modules I've got here. I don't have to put the number on, but I wouldn't know. I would just throw it away or lose it. But by putting it on, I know I can claim that I had the first one. There's no native SATA support, right? I don't know. I wanted to put the number on because I got number one. Okay, so we must line up the holes here.  And the connector here is not the same way through. And that's true there as well. It's closer one side than the other, so I'm just going to do that. And I'm going to pull it up because I want to make sure.  Fun fact, I use these connectors on the drone stuff I was doing. Okay, so that looks right. Want to know, can I use Arduino Uno instead of ATMega32U for making my own duck? You can't plug it in the wrong way. It's physically impossible. Really? Oh, because it would hit the ports, right? I don't know much about Arduinos, and I don't know what you mean by making a duck. Fede2 asks, what would be the first step to getting CircuitPython on the Pi4, the US2 bootloader? No, I think the first step that's on my mind is getting tiny USB support going. So get the examples of the tiny USB stuff going by just building something and then putting it on those SD card and booting it. Just get the tiny USB demos going. Yeah, it collided with the connectors the wrong way around. Cool. And look at how compact that is. And I don't see that I have any shields for the Metro on my desk. But that's the idea, is you could use shields. You could also use stem of stuff, which I think is probably more likely. I don't know what a Wi-Fi duck is. So if other folks do no SATA, ah, a HID application that writes bad stuff to your computer while you're not looking. Well, the Arduino Uno cannot do Wi-Fi, so if you want Wi-Fi, you're going to need something else. Yeah, so the first step to getting CircuitPython on it, I think, is actually getting tiny USB support. And the USB peripheral in all the Broadcom chips, as far as I know, all of the Broadcom chips in the Raspberry Pi's, they all use the same USB peripheral that we actually support in tiny USB already. So I think the biggest difficulty comes with it's Cortex-A, so that the way that it handles the way that the Cortex-A does interrupts and stuff is different than what we're used to in Cortex-Ms. There are PCIe to SATA boards in that form factor, though, for around $15 if you want SATA. Um, isn't the Broadcom chip on the Raspberry Pi's a stumbling block without the dock specs? I don't, it's certainly not as good as some of the Cortex-M stuff, but generally because it's so popular, people have done a lot of research already on what, um, on how to use them. Like, the thing that people really want to hack that's really not documented is the video core, the video core, which is actually like the proprietary GPU that they've, like the chips are built around. They kind of like took this custom GPU core for playing video and stuff, and then they like tacked some Cortex-A chips, uh, Cortex-A cores on the side. And that's kind of like where they're like, oh, we could actually do general purpose stuff on these Cortex-As. Um, there is actually like reasonably good documentation for the peripherals. So if you look for like BCM, PCM peripherals, and I think I linked to this, but you can actually find like what you would think of as a datasheet, um, including like address map and registers, I think registers, DMA, interrupts, spy, system timer. I thought they had a USB one here as well. Um, but the UART, this is just one of the Raspberry Pi chips. So basically like, they're like not that poorly documented. And there's like people that have been trying to do, um, like there's already people that have done bare metal or Raspberry Pi stuff. It's just like, I don't have the background with it. I did just do this tutorial thing and got stuff running. It's just like, I don't have the time to like generalize it. So ESP32 does not have native USB. So if you're trying to do something malicious with USB, then you'll want an ESP32 S2. But be nice. Don't be mean. Be nice. Okay. So that's the Payunora and I'm going to get to it at some point. And if folks want to beat me to it, kind of like Timon beat me to actually making the device, I think it would be amazing. Timon, I think is focusing his effort on Linux support on the device, making the Linux software on here act like circuit Python, which is still a very cool, very cool idea. So yeah, I think that's what's happening with that. And you can find it on CrowdSupply. Who is being mean? I took, somebody said that Wi-Fi ducks are mean things because they like cause unexpected things to happen on computers. So that's what I was getting at. No, but it was like downright mean. All right. It's hot, isn't it kitty? Oh, you can't see him. Cat cam. I'm not sure you're gonna, I might have to adjust it. Oh, you can see this is what he does during the summer. And those of you, I guess this is the summer number two, but if it gets too hot in here, he's, he was all curled up in his bed. And now he's like sprawled out, sprawled out on the floor. This is the thermometer we have in this office is what form the cat is in. All right. Well, that's Pioneer. Thank you Timon for getting me an early one. I do hope that I can get to it at some point, but I've really got a, I've got lots of stuff that are, that's peeling my interest away. Carboard scratcher looks awesome and been eyeing it for a while. Do your kitties like it? Which cardboard scratcher? Oh, this circle one. Yeah, they like sit up there and scratch on it. I think they do like it. We've got a second one downstairs as well. Okay. What's next on the list? That's cool. And if somebody wants to help with that, that would be amazing. I would, I would love to just have circuit by then on there. I want to have it in the, the regular repo. But Blinka is, is for the Linux based stuff too. Okay. So PyCon is happening this week. PyCon is the Python US conference. And there was the language summit. The language summit happens every year. It is a, it crossed my mind to put a heat sink, a Raspberry Pi heat sink on my camera if we have problems with it getting too hot. So every year there's the Python language summit, which is kind of a private summit where some of most core devs for, for Python, proper Python gets together and chat. But they also do allow folks who are maintainers of alternate, alternate Python implementations to come too, because often what's discussed has to do with like the language itself and changes made to the Python language. So there's some interesting stuff here. So I, that was Tuesday and Wednesday of this week. It was like two, four hour chunks. Wednesday I had like six hours of meetings. So I'm kind of like done with meetings for this week. I'm excited for next week to be a bit freer. So here's kind of what the schedule was on the blog, on the, on the Python blog, you can see recaps of all these stuff. But what I thought I'd do because it is a private talk is that there is, there's a lightning talks. And I was one of the pre-selected lightning talks. So I thought I would actually just go over that right now as a way to have it kind of publicly documented kind of verbatim. What we'll do is we'll do it. Hi, Mark. We'll do it just kind of like I did before is like, it's a five minute talk, but I'll just not, it may take longer here because I've got time. So let me get that going. Oh, and I have two going. So, but I think I actually can, I, sorry, when I practice it, I have had recordings of it. So I do have, I can either do it in this view or maybe I do it in this view so you can see me, but I also have this view. Is that a better view? You can't see the chat. That might be cool. All right, let's just go over this so that we have kind of a recording of it. Mark Olson, I know you're here too. Thank you for hanging out. All right. So thanks for having me at the language summit. My name is Scott. I do Adavroot, CircuitPython.ny stuff. And I want to take the time to talk about CPython versus CircuitPython kind of using that comparison to get at what is core to what Python is for people. So if you don't know, I always do this. If I use the mouse wheel, it goes too far. For those of you who don't know, CircuitPython is a small version of Python for embedded microcontrollers. And we've taken kind of CPython, which is like 29 megabytes-ish when you download it off it. And we get it down to about 650 kilobytes just in the example that I've used here. But the reality is that we can actually go a lot smaller as well. So how does that influence what we have? And kind of my assertion is that CircuitPython still feels like Python even though there's a lot missing. So I want to talk about what we don't have in CircuitPython that is available in CPython. So here is all of the built-ins. So this is like DER of the built-ins module. And this is DER of the built-ins module. And I use this as a proxy for kind of how much of the core language has been implemented. So kind of what you'll see here is a lot of the built-in types. And then also there's like syntax kind of follows this trend as well. So here's all the CPython ones. And here's the ones from there that we have in CircuitPython. So what you'll see is that we have the vast majority of the built-ins. And this is testament to the great work that the MicroPython folks have done, which CircuitPython is based on. They've done a really amazing job of getting that core, what I think of as the core of Python, the syntax and the built-ins to be the same. And that's really, that really makes a huge difference. Now the second thing that has to do with it is the modules that are installed by default. So this is a list of all the modules that are on my computer as is. There may be a few that I've kind of slurped in due to PIP, but I think generally this is the things that you would get with a fresh install from CPython. And I've also knocked out any modules that start with underscore and things. So these are just the ones that are kind of like public. And here's the ones that we have in CircuitPython. And you can see that we have a lot fewer than what CPython does. So I think it's really interesting to see which individual ones that people are kind of like expected to see and all of the ones that we don't have. This kind of trend goes one step further as well with built-in modules. So I just picked random as an example, a random example. So this is all of the public APIs on the random module. This is using dir and this is for CPython. Here's all the ones that you get in CPython and here's the ones that you get with CircuitPython. So you can see that there's a lot fewer. But these fewer ones are the ones that I think kind of if you've used random previously, these are largely the ones that people use. So I think that's really interesting to influence or show how you can use a subset of a built-in module as well. And I should say that CircuitPython tries to be a strict subset as well. So we want people to be able to use this limited set of random and then go upstream into CPython and their code just works. So there's two takeaways I want to have and this is the first one. The Python feel, I would claim that both CPython and CircuitPython provide require actually quite a small core. That's a lot of built-ins and a lot of syntax but not a lot of standard library. And even when we do have standard library, you don't necessarily need everything for that as well. And it's important to note why that matters is that smaller cores mean that Python can be in more places. CircuitPython is a great example of that. So it's important for us to think about how we can reduce the barrier to getting Python in more places. And I also want to point out that smaller not only means that it can go more places but it can also go places faster. So a smaller binary means a smaller download so potentially you could see getting Python delivered kind of as needed. However, by being a small core there are some things that have been left out. Now all of these some of these things we kind of have alternatives for now but we may have not had it in the past and people asked for it. So those things are NumPy, fStrings, Pandas, Jupyter, PDB which is debugging and ASICIO. This is by far not an exhaustive list but it gives you an idea that like actually the things that people bring from their Python experience to CircuitPython are a variety of things. They're syntax things like fStrings but they're also third-party libraries like NumPy and Pandas workflows like Jupyter and PDB. So it's really a mixed bag and that's the the last thing I want to bring and the second point I want to make is that Python is actually much bigger than what ships with Python and what the Python runtime actually is. You know people have people associate Python tooling like PyCharm and things like that with Python as well as well as the packages that can get up PyPI. So it's important to think that it's okay to think about moving things from the core out into the wider Python ecosystem in order to get things into us in order to reduce the size of the small core that we can get to more places. So that's it. That was my my lightning talk. So let's go back to this. 1600 megabits of pure Swedish internet here says Johnny. Oh you're going to segue next in it right next into my into the next thing. Any questions about this? I see FedE2 asking have people asked for something like pit? Um you know MicroPython has MicroPit but a lot of people kind of reached the same conclusion that I reached which is like having something built-in is not that helpful because most boards don't have internet. I think it would be fair to say that people want something like pit because like Nicholas Toleroy started CirCup and then like Patrick and other folks like really ran with it and made CirCup really really cool. So it's uh yeah it's important to I think we need a packaging story. I don't necessarily know it's pit but I think CirCup is kind of that and the the data that we're getting for CirCup is like being very generally useful like the project bundles as well. UnexpectedMaker says very cool but async is in MicroPython. I know it's not in CirCupython yet but should that be in the last slide? The last slide's not about and this came up earlier as well because so CirCupython has f-strings now too so the the point of the last slide is not to say the things that we were missing but the things that people have asked for when we missed them. NumPy we have MicroLab as well so I think it's don't that slide's dangerous because that slide gets misinterpreted. Yeah CirCup. Cpython without pip would be very unusable. Yeah. MinnesotaMentat said would love a brief review of exclusion choose choice for f-strings. I'm not exactly sure what you mean. Yeah I probably won't give this talk again so I tried to be clear when I just said it but obviously some people still had the the wrong conception. Like right after I gave the talk to the Python language summit like Brett Cannon pinged me of like oh CirCupython doesn't have NumPy and so I replied it was like actually that wasn't my point. My point was this that people want NumPy and we have MicroLab which is a subset of NumPy so yeah it's a little confusing but that's what I meant right like my point is that like and this is the thing that's really hard to do as somebody who leaves a project is like you will kind of want to add the things that people are asking for if you if you go out of your way to add something that nobody wants nobody will use it and you just waste it a bunch of time. So CirCupython has f-strings it's implemented as a conversion kind of at parse time into format strings. There were some concerns about that implementation when they proposed it to MicroPython so MicroPython does not have f-strings yet but it's on their radar and those of you don't know f-strings is a way to put your variable names in line in the it's in line in the string itself so you do like I can show you so here's my alpha 2 build that I was debugging on if I just do x equals 1 I can do f I assume it works here and then you do curly braces f of x and that that kind of it binds immediately so it's great for printing out debug printing stuff and you can also format it just like you would x is kind of confusing because that's a variable name but you could format in the similar way to like 0 8 d using the same sort of thing that you would with a oh you don't see my screen thank you didn't see that yeah thank you thank you thank you sorry so um this is just CirCupython x I did f of curly braces x and then I printed out a string with the variable in there the theater of your minds um yep and then the second f-string so f-string start with f for format I guess um but they capture the variable at the time that they're in the code whereas if you did something like um if you wanted to do it later you would do something like f equals oh it was like a bug a bit so now I have the string here that hasn't captured it yet but you can do f format right and then of x and now that gives you that so f-strings are about like um what is the cleverest way to parse an incoming string in CirCupython for say erratic strings from another CirCupython pushing variables over UART I don't know if I would do it that way I don't know if I would go I know how I would do it in Cpython Cpython there's this great library called parse um Python parse library it's really cool it's the reverse of format um so this is only in Cpython that's not available in um regular Python but you you can say like give it the same format string in it it gives you the result out it uses regular expressions under the hood um in CirCupython I think the easiest way is like comma separate it and then just do a split and then cast so if you have like an int coming in you just do like let me show so like say you're getting a string s and it's like one comma two if I print that what I would what I like to do is like s split of comma right so now you have two things and then you could say int of s split and like the zero a thing now that gives you an int as one one yeah so like that's kind of like my approach is just splitting and casting um it's not super clear I guess but is it clever I don't know if it's clever but I do that a lot I do a lot of I love Python scripting as maybe yeah I want to talk about as well Nerodoc says if you control both ends I'd use JSON yeah JSON could be quick when you add something that is not used it is then taking space out that something could be using and used by the user base mark Olson points out message pack which we do have thank you to iot49 I think is the community member who added message pack but you could look at message pack as well as a way to transfer data across Ryan G points out JSON is easy but it's pretty inefficient Gareth says clever programmers try to write straightforward code all right well there's some there's some options for you to work with what's next on my last year broadband map let's should we get away from circuit by thumb for a little while before we get into the last debugging stuff I just looked at the neopixel on this thing and it's not right proto buff has become extremely popular it's got bindings for a ton of languages yeah I like protocol buffers a lot so let me venture away from circuit by thumb and show you kind of what I've been doing outside of work because you know I like to do that so um you I showed off this wallah stuff last week or the week before and the the two merge requests that I had faked here are two different broadband bills in Washington state where I live and I just wanted to say for this that both of them both of them were signed by the governor so that means that their actual law um which is awesome the second one had one veto that I'm not sure they they the governor can veto like individual sections um and uh so yeah both of these were merged both of these were merged um yes unexpected maker are you around for the rest of the hour or do you want me to skip to that because you're curious um I could explain it yeah so I think this is pretty cool and I actually linked somebody to it earlier today because we were like a little worried this um 53 83 I'll just show you 53 83 so these are both about um expanding who what what government agencies can provide broadband service directly to customers so retail retail ability so public utility districts who do like um who would do like water sewer garbage electricity well uh that sort of stuff can now we'll be able to now directly sell um we'll now be able to directly sell broadband internet to customers as well um if they're in underserved underserved areas um but I linked to actually so this shows the revision history of the bill itself and uh we were a little worried because this bill originally had a clause that allowed um commercial interest to object to it um but it's kind of small how do I a little bit bigger so what people were worried about is that's just reporting ah this this bubble here so the original version of the bill said a port district may provide retail communication services to an end user in an unserved area if the port district receives notice from the governor's statewide broadband office that an existing service provider has not submitted an objection and a broadband service plan required for the subsection for the same project area so basically this gives incumbent internet providers the ability to prevent public utility districts and port districts from doing internet in their area if they claim they have a plan to give better service but at the end of this bill they actually deleted it all they just they replaced it with a port district may provide retail communication services to end users in unserved areas which is awesome so they deleted a bunch of this stuff that was like particularly bad um they do still have to provide notice that they're going to do it um but they don't have any veto ability um and they set the minimum the definition of unserved is 100 megabits down and a 220 megabits up which is larger than um which is better than the federal standard which is 25 down three up um and then there's there I was looking at this today there's actually this other I don't know if it's in this version so here's the what unserved means and I think I was looking at the changes overall but um there is also a condition here that uh when they do it they have to do it as an open access thing so if they run fiber to somebody's house they have to another ISP has to be able to provide the like ISP side of it which is super cool um so um Mark asks how fast is your internet so I have fiber internet here so I I get just under a gig of it per second both ways um which I love it's awesome yeah protocol buffers are cool I'll actually talk about that in just a bit tiny as to right yeah FedE2 says specifically for broadband in Costa Rica we have mostly one bad provider per area instead of the chance to choose a good one so they're all mediocre anyone should be able to give internet anywhere yeah so the reason is is that um I have sands though 100 megabit per second symmetrical so this is a segue to another project that I have that I worked way too much on last weekend um I'm starting this site now called fiber deserts.net um and what it is is it's trying to map in the US where um what service everyone has so it's based on um this is using matbox um and it's using the FCC is the federal communications commissions or something um the ISPs are required to report uh at the census block level which varies widely and I was trying to get it in this map but it wasn't working um trying to report at the census block level uh what service they provide and like what technology they use to do it so this looks like a pretty normal map um those of you may not know that I worked at google for six years on google maps um doing kind of rendering stuff like this uh and styling stuff so this is kind of like was my jam for a long time so it's kind of fun to see where the open source world lives mr. certainly says 50 50 the apartment 50 25 at home we could get more but it'd be 100 plus a month for the increase 50 down is more than enough for one to two users how much um mr. certainly if you don't mind how much do you pay for 50 50 um did you work on any of the maps plus satellite stuff no I didn't I didn't do any satellite stuff I was literally like taking vector data and rendering rendering the map um David Buchanan says yes the federal FCC broadband rate is poor but the big ISPs have a lot of influence on setting it hopefully they will be forced to do better at reasonable cost yeah mr. certainly says 84 a month for 50 50 from Verizon see I'm paying 85 a month from century link for my gigabit symmetric hugo says 500 symmetric for 50 a month from frontier files anecdata says my five megabits per second dsl is 60 a month yeah anecdata if you're in the u.s. I would check to see if your locals if your state or federal the federal FCC has a download thing you can do and Washington state has it as well um but yeah I would encourage everybody to look at the FCC and do any of their download things yeah mark has 150 25 for 50 ish in the u.s. um Timon in Germany pays 60 a month mark Olson pays 50 us for 250 oh yeah so I haven't even shown you the coolest part so when you zoom in it actually colors the buildings whether they have fiber or not or whether we think they should have fiber so based on this is projecting kind of the this is projecting the the census blocks onto the buildings so what we have here is we have like this building we can see that the best person they have is Comcast and they're doing cable and Comcast actually can rate higher if I'm doing like the total speed so one thing this kind of garbage about this FCC data is it is the advertised rate it's not the real the real rate um and then I also have it tracking whether there's anybody in the area that provides fiber um and if so who is it so century link fiber is here as well um and then if we look at like the black one we'll see that it's just Comcast one thing I found I was looking at this and this is actually an old version I need to push a newer version and maybe I can get it going so I actually was I've been working on this a little more than I should have probably but the newer version I have is actually also coloring the outsides of the roads green if we think there's fiber there and by fiber I mean like potentially business only fiber um so here you can see that there is no fiber to the home but there is fiber in the area because the data says whether it's like consumer or business only and the reason this is interesting is because generally fiber like telecommunications cables are run along the roadway so say see this big sorry I need to figure out how to make this inspector work differently but see this big clump here of all these homes that don't have anything they're just um Comcast like if we wanted to figure out how to get them fiber you would probably run it along the roadway so marking these roadways is like this probably has fiber allows would allow us to do this like maps network algorithm of like figuring out the closest place to get this house fiber for example um Fetiti says what color are the buildings where the NSA sniffs everything that's all of the colors although to be fair one of the things that's good about fiber optic cables is that they don't radiate they don't radiate data like copper wires will have like magnetic changes outside the cable so at least fiber they have to get a little bit clever more clever about how they intercept it could you get around the business consumer by getting a business plan for a home-based business potentially um good night Dave andreus is showing off 13 a month for 300 yeah johnny says my cable tv is being offered is 1.2 gigabit and gives you a router with one gigabit ports yeah i was thinking that would be actually if i had to pick what i think the minimum rate should be is the minimum rates should match common wi-fi speeds right because most people are going to just plug wi-fi into their wired network connection so i would do it based on like how fast like a wi-fi access point is like wi-fi 6 or ac right is like kind of i would i would pace the minimum broadband requirement to match wi-fi speeds is what i would if i had to pick what the speeds would be um but then that that requirement has interesting consequences for like policy right so that this map is really interesting from the perspective of in the us there's a lot of money going towards infrastructure um including broadband and like how that money actually gets spent and whether it ends up like laying fiber is kind of like really important uh because that money could be in my opinion wasted on like paying for wireless solutions where wireless solutions are not going to be a long term investment um so one thing i was just browsing this though and this is kind of neat so here's a there's a big dam here in grand coulee uh it's where a lot of our power comes from i think um but one thing i was i was just looking through this and it was cool it's actually their fiber is actually already provided by a public utility district um which is really neat and um so i looked them up grant county pud so it's a public utility district and um where did i see it but they run an open access network so i forget where they see it but basically they say like hey here's where you can see all the different people that you can buy internet from but they manage all of the like the physical infrastructure um which is really cool david says it will be interesting to see how 5g sell a broadband to the home influences the costs yeah i mean i think that's also the danger is like people may think that 5g is good enough when like it's probably still best to just run fiber everywhere like just spend your money on fiber um doctor says i have a 10g network want to want internet to match and you can get where they are at least you can get um business at a residence for a registered home business yeah i don't i only have one gig uh ethernet in this house too so anything over a gig is not going to be useful all right okay so that that that's my like non project so if you're interested in this um and yeah if you're interested in this let me know it's kind of just the next thing i want to do is i want to actually overlay the outlines of all the all of the um census districts or census blocks so that um people could actually look stuff up because there's also um there's also like uh ardoff i forget what it stands for but it's like one of the there's a lot of money going towards uh rural broadband and so there's this it's rural development fund or something so there's a lot of money that they've announced for like providing more service to people um and they kind of like tell say what census blocks those those grants will give so i want to be able to say like for this block is there any ardoff money going there and if so like are they going to spend it on a fixed wireless connection or are they actually going to not um so yeah that's i've been really interested in broadband policy i think um i'm a firm believer that everybody should just have access to low cost high speed internet um and that is an equity issue as well so um this is another way that i can hopefully help with that policy and it was started from there's a podcast that i listened to and the guy kind of said like no it'd be really nice to have like a public uh data source for all of this data um so that's i was like oh i could i'd like to work on that so that's what i'm doing okay that's my four way that's that's the non-hardware debugging app had to deal with i only have one gig even internet should be as easily access to food and water i definitely think it should be utility but i think food and water higher priorities which podcast um community muni networks dot org yeah muni networks dot org has connect this this is the podcast i've been listening to um which is really interesting it's folks that like run isps and then they also have um broadband bits as well i think another map oh i could i could rant a bit about maps um i really as somebody who worked on maps a long time i really just like maps like this um where they just like splotched everything on top and i think you could see that in the way that i've started designing fiber deserts it's like it's just kind of terrible um oh i think this is out of date yeah this is a restriction they've they've uh lifted that restriction on public utility districts i don't know what these are visit network website dark fiber i will have to take a look at this this could be kind of cool like i'm looking for all these sorts of like data data sources that i can kind of like glom all together one other one is that the at least in washington state the broadband office right turn right broadband office we can talk about terrible maps here too has a speed test so you can actually do like a like a a speed test and they you put in your address so that they can um tell you where you are and you can give your contact email um we do not store your personal data or address so they do store your email and i actually kind of found i found the raw the raw data for this so and they have emails on it um but you can go here uh oh nice orienteering so here's here's the the results of that um survey um and it's interesting to see like total survey response and again this is just like dropping i think they call these measles dropping measles on the map so another thing i'd like to do is i'd like to take all of this data and partition it by those census blocks so that you can be like searching around and find the census block where like some of these bad reports have come from and you'd be able to say like these providers claim to have this service but these people said that they have terrible or no internet available in that block um so uh i want to ingest this data too i'm gonna all strip the emails that are on there because i don't need them um paul says in lisbon portugal i have a fiber connection 200 100 together with 150 channels of tv fixed phone and one mobile phone with three gigs data package i pay 58 euros a month i forget what euros to usd is i think it's a i i only find out when i go to europe let's just look euro to usd $70 like that's super good right like for tv phone and a mobile phone and fiber like i'm paying 85 for fiber alone although it's faster david g says i installed lever speed at home and did run speed test it from very various places in my house and various technologies should i do a map yeah well i think that's one of the things that whenever i'm looking like speed test data i'll have to account on being like huh that cat that's suspicious it's suspiciously capped it like what a wi-fi connection would cap you at um so i have to take that into account and that's kind of what why my philosophy is like the minimum should be in line with wi-fi speeds because like the reality is is that people are going to be on their phones or their laptops like wi-fi is going to be the way that a lot of people are going to use it okay enough of that let's go back to circuit python and get our snorkel masks on to dive deep here at the end but first we'll cover um the broader thing that i'm working on so uh because unexpected maker missed it last week i think so um let's just show unplug my headphones we got a snorkel emoji from mr certainly so what we're what i'm doing is i'm changing the status led to what somebody in this chat a few weeks ago i think rightly pointed out that it's kind of a it's a um only when you need attention sort of policy so here's the this is the feather nrf under here um and i think it is actually running code let's shut the server down this is the other board i have plugged in it's probably two there we go so um the elit status led is changing it used to do when your code ended it would do this big long complicated like here's the file here's the error here's the line number sort of pattern um and it would kind of repeatedly do that constantly and once we did low power i realized like one that um that stuff is like flashing the line number it's just more painful than it is helpful uh because so many people like i counted it what does it mean is like no just connect to the serial port you'll get a lot more information so um i wanted to do away with that because it's just frankly not helpful and then what i realized is like we should actually be much quieter with the led because it takes power and now that we can do low power we should have this model that's like more judicious like doesn't blink as much so uh it's i've simplified it all it uh the led lights up at the start when the safe mode window is happening and it does a blink pattern there it's like 700 milliseconds although dan had the idea to make it longer we might make it make it longer so it's easier to hit um and then there's three three patterns you can get after your code is done well two patterns after your code's done and one for safe mode so safe mode will be three blinks three yellow blinks this is an exception happened it's two blinks and it's every five seconds and it's red so the color is a nicety it's not required so yeah this is this is what happens if you get an exception so it's just enough to hopefully catch your eye so that you can check on it and and figure out what's wrong if i have control d now the code is running and you'll see that the led is not on at all it used to be green but now it's now it's quiet which is actually it turned out to have this really nice consequence is that we don't change the status led colored while code is running now so um it's actually much simpler internally we just use the led we initialize the led when we're going to use it and then we de-init it when it's done um unexpected maker says this all only happens when usb is connected right it's bypassed when running off battery or external power no um this happens off usb as well um because the assumption is that you you would want to know if either your code completed and is no longer running or whether it aired for some reason if you're doing sleeps it won't do anything but if you're if you're in the state of like you thought your code was running but it's not like it's still meant to blink um and i did change the code and and this is one of the reasons i was having problems is the code that flashes the way it used to work is it used to be this while loop that kind of perpetually set the the state of the perpetually state this the state of the neopixel every time it went through the loop so it was like super super bad in terms of power um but what this code now does is what it will do is it will set the state of the neopixel and then it will sleep it will light sleep not deep sleep but light sleep until the time to wake up and change the state of the neopixel again um so it it's a lot less time a lot fewer times through the loop as well um so it should actually be it's it's not as good as deep sleep would be but it's a lot better um and it's really meant to be this mode of like something's wrong like you should take uh you should take a look at it so like so it's it's a five second gap so that you so we save power but then also we should be able to hopefully see catch out at the corner of your eye these two blinks if it successfully completes um it will just be one green blink um at the same rate and the there's the charging led here that you can see maybe the flashing of as well so yeah it's meant to be simplified um thank you again to niradak for testing this out because on the nrf it works just fine uh but it turned out there was a bug on the uh on the atmel samd's which is what i has absorbed a ton of my time and that made me so unhappy with neopixels um um unexpected maker says okay so unless there's an air circuit python doesn't touch the led so no additional current draw for code running a sleep wake wake cycle correct yes it will turn it it will do the init um if we look at the code it'll do an init but then it'll be turned off when you go into deep sleep so this code is in um main actually moved it back to main so here's this is we're in run code up high and here's where the code actually runs then this is what happens when it finishes you do cleanup you see if you were forced to exit and then you just return otherwise you go into this kind of wait state um so first we figure out like okay which color are we going to blink in for how long um get the the timing information to start and then we this is where we'll uh init the status led so we will actually initialize it um um which i suppose we could prevent um but then in this so this is the while true loop this is waiting for you this is the like press and press any key to go into the ripple or control d to start over this kind of this is the loop that's running when that's happening so there's a bunch of ways you can break out of it um there is this uh if a reload was requested by the supervisor if interrupted by the keyboard um if fake sleeping then we check the alarms um check to see this checks to see if um serial connected has been if the serial's been connected while it's in this state um if so print out that that's what it's doing and then there's kind of this big if here that says if you were exited because you're going to deep sleep manage like we have to wait a little while to give us be a chance to start up and then uh either pretend to deep sleep um or uh wait i guess we turn the status color off which i don't think we need because it should never be on so the only time it's actually status color is set on is in the else clause of that um which manages like refreshing the display and setting the colors on and off based on timing and then you can see here that there's actually this idle until interrupt um and there's a bunch of debugging in here because it wasn't working on the sam d's let's see so on my feather s2 that has an rgb led running off ldo2 ldo2 has to be powered on for the rgb led to work so if it gets a knitted ldo2 gets turned on even if the user wants it off um we don't we don't have a good story for how we manage on board power switches um i'm not sure what it'll do on your feather s2 i don't know how aren't we just turning it on forever or something um there is i think i have board a knit stuff in here as well yeah board a knit as well so it could be part of board a knit um i'm not sure what it'll do you should check but like the the principle of it is that like in circuit python if the code is done it doesn't we don't care what the user wants right like it's the user code has stopped therefore the users has no influence over what happens but that's not entirely true like if you're deep sleeping clearly that handle that that influences what happens afterwards and then also um oh randall says flash the blue led on the feather s2 yeah so all of this code um it does work um it does work with a single led as well because the flash patterns are different so that's an option as well um oh david says miss the beginning what is the recommended cm4 for pyunorus circuit python future use and did you see on show and tell that mica plans to work on cp bare metal on the py4 i didn't actually i missed show and tell i will watch that after this thank you for the link i missed show and tell because i was at the python language summit um ldo2 is user switchable on a sleep wake cycle a user would want the wake time to take a little as little power as possible before sleeping again to elongate battery life uh i mean yeah we could we could refine this i don't care that much the main thing i want to do is get the leds blinking differently otamone says hi david i recommend any model that has wi-fi wi-fi doesn't really matter because it's unlikely to be supported anytime soon in circuit python but yeah generally having wi-fi would be better for for cm4 yeah you could set you could set it up to be i did change it so if you you just don't want to you just don't set the rgb status led to the pin you want you have for it just set the blue led and then that'll be it you could do that it should be just fine um okay so where am i at well i'm in terrible no fun neopixel sucks land pardon my french or not french um so here i have a feather and for it's currently in the repl and the the neopixels blue unfortunately which so the neopixel is supposed to be white like in the repl still the repl works a little bit differently but its shells should be white uh but it's blue instead and if i hit reset it's like right next to the neopixel if i hit reset wait was that yellow no it's green so it's supposed to flash yellow but it flashes green instead which is just like such a pain um so the feather and for is the timing's correct now so i found a bug where um i found a bug where the sandy was not sleeping long enough um it was sleeping weird intervals the autograph says could use just enough wi-fi for a second repel wi-fi is complicated i don't think you can i don't think it's easy to get to have just enough i think if you're going to get wi-fi you're going to get all wi-fi um i'm actually more interested in bilie on the on the raspberry pi boards i love my cp board because they have on board flash and i don't want to find a micro sd card every time i want to use them yeah i mean they have em em em c ones so here's a capture i did earlier of neopixels neopixels are this one these ones in particular are going to be huge pain so i actually have some other boards i want to try as well like like boards on my desk here i want to i haven't tested the sandy 20 ones yet and i've only had a problem with the neopixel on this feather and bore so i want to find um um oh i think i have other m4s here i just want to try those as well and actually if anybody has a feather m4 handy and is on discord i wouldn't mind sending you it would be nice to send you a uf2 just to see if it works um in the last 30 minutes that we have here so i've actually played around with this timing a lot um and based on my understanding this is actually a bit slow timing but it should be perfectly valid even if the i have a thing on here that should capture it correctly but i'm i basically like so here's the this is the analog trace um here's the christin says is the resident led just burnt out just got here so not sure oh for the yellow i suppose it's possible i suppose it's possible that the red element of the neopixel just doesn't work because i've seen it is that true actually that could totally be possible actually that that would make a lot of sense because the the um um interesting yeah christin i think you're right if red is dead yellow will be green and white will be cyan holy moly i think you're right because the bootloader which does work green if i turn off data so i just flipped my switch off screen here if i double click it again see what the red led is doing it's ramping up and down to show that usb is connected but there's also a state where it's fast but now it's off i think that could be it i think you're right okay let's just confirm so some folks have some but it's not a reflow because it's like clearly the chip itself is connected but yeah i think you i think you're right um m4 can yeah tell me what samd 51 boards you have and i'll drop some builds in discord and we can have folks confirm that it actually does work i've been messing with a lot so i should actually get it probably back within timing but we could do that in the next 30 minutes that's easy um but yeah that would make i didn't think about that that the hardware is actually broken i don't know why it's so slow though so um let me just build a new one yeah maybe i maybe i could actually see it because there's usually like the bond wires right it's possible like the bond wire is broken all right so i'm gonna jump build ooh my air tag was delivered kind of hard to fix that hardware issue in software well i was trying to um okay let me feather m4 all right so if you want to try that out that's in the live chat discord oh reflow to change the led drop to repel and set it to red that's way more work than i want to do i think it i think that actually makes a lot of sense because i did try it so i had this feather this metro m4 and it's working i think it was working so i think i just messed with the timing a little bit more than i should have but yeah see this metro m4 which has code i put on today is working um so yeah i think i think it would make a lot of sense that that feather m4 actually has just a busted led um yay more work so let me just get these timings i want to get these timings kind of back to what they should be so um the thing that i was going for is um how did the test environment cycle well i think it worked but previously i don't think it's been broken forever i think it's just like these all these boards are old and i don't treat them well so it's not it wouldn't surprise me that it was like an issue from from just my environment being on my desk um okay so one thing i want to do is i want to get rid of this gap so let me show i actually change this code so um circuit python so the sandy code and we need to check check the m0 common how neo pixel right lots of m4s but no feather just see if you get red so uh load that uf2 and then if it blink it should blink yellow on startup for safe mode and if red doesn't work then it'll be green and then if you just put like a raised runtime error jose david says the neo pixel is not working mark says mine is blinking red okay good this is this is good so these these numbers i think are a bit out of spec so there's this really weird thing and i looked in jeff is the person that added it so this is the neo pixel core code and i'll get a little bit bigger so it's actually assembly code yeah two red blinks static or over voltage could just kill red since it has a lower forward voltage but that's just speculation it would be unusual for the neo pixel to lose a channel not just die though i mean it works on the metro though so this reminded me a lot of my pio programming so there's and this this code comes from the uf2 bootloader and one thing that jumped out at me when i was looking at this is there's these if deaths for sandy 21 and sandy 51 and the delays are the same it says delay six delay six and i was like and six here and six here and i was like that's weird right they're clocked at different rates um sandy 21's 48 megahertz and the sandy 51 is is 120 megahertz it's like how is that weird like how does how is this code even working um because the clock rate should be different and yet the delays are the same um so that was really weird to me and so what i looked down here is that there's this big long thing but it's interesting when this routine is positioned at certain addresses the timing logic blow could be too fast by about two and a half percent or two and a half times which you know what 120 divided by 48 is about two and a half right it's like about two and a half so when jeff went in this code before i think he debugged this issue as um the timings were wrong it's not his fault though because the u of two bootloader um doesn't run the sandy 51 at 120 it just leaves it at 48 which is what it starts up as so in circuit python we take that 48 we boost it to 120 but um in the bootloader we don't bother because 40 is plenty fast and that's what you need for usb um so there's this cache changing stuff for neopixel for the samv 51 that's basically like reducing all the caches between the flash and the flash must be slower the flash might be clocked at 48 um and by removing all the caches in front of the flash what this code is doing is it's it's effectively running all of this assembly code um off the flash at 48 megahertz i'm not sure the feather m4 can has the same pin out i can build you a m4 can if you want to try it i was a defeat was it just m4 can they're just all going to be called from where you have to so maybe like keep track in the chat which ones were which um yeah so i thought this was really weird that it had to do all this cache stuff because i realized like oh the the reason it's doing that is because the clock rate's different um so what i have here is in my version i've taken all that cache stuff out um and then what i've been doing is i've been messing with um these delay numbers to try to get the timing right based on the salier captures so i was i've done this a number of times now but the last time i did it was for the rp2040 and the pio makes it really nice because it's it's exactly doing changing code like this to be like cycle accurate um so i started changing this to make things different but if red if the red is just broken on my neopixel actually i just want to i got it back to like when i asked phil b about this it was basically like um it was basically like shoot for 800 kilohertz overall and do a third two-thirds um let me grab that build for let's say okay so this one is the can build can't um and if other folks want to try let me know but i'm going to change the version here in just a bit so i undid some of the timings and i'm just going to do it on the metro because i trust the metro so i just did it back and let's see where we are at so i'm going to make myself a metro build and i'm going to clean to make sure i'm exactly on what i want i love this fast computer oh i'll just clean it it's fine all right i'm gonna flip usb on but yeah that would make sense it just doesn't work i'm gonna double click and i'm in the bootloader oh you know what let me unplug this feather if you want to test red you can try cv code to turn the neopixel red but there's other code that's trying to trigger red um that's running and i i was like salient on the lead of the neopixel so i know that like the data is getting there yeah too yellow and then too red repeating that's right so you should get some yellows at startup thank you dexter you should get some yellows at startup that's when you can press reset to get into safe mode and then you should get two reds repeating if your code is crashing um for any reason so metro so i'm gonna i just want to adjust this code back to i see the yellows at startup too mark you see the yellows but you don't see any reds it's possible your code is running depending on what you have on there if your code's running you won't see any blank cell you won't see any other blanks so like get in the repel and like or get in the serial i'm using arch linux for me os hosei david's not seeing anything let me how's this one doing so it's still working i actually want to do a salient capture and hopefully this computer can handle it so i'm actually gonna do it straight off the leg and i think it's the it's often one sorry if i end up with my head under the camera i may do a capture welcome to the world of neopixel timing tuning all right so there's one i should take a capture like this on a on a six two board because you'll see that like the white neopixel and the repels is correct red is after a code.py error that dropped you to the repel it won't drop the repel should be white but if you're in that intermediate state where it's done it should be red okay so let's see how close we are on timing so here we can see that we have the blink one two one two so on off on off um this is off so that's not going to be that interesting this on will be so it looks like we're all a smidge fast so i'm looking at the frequency is 968 and the duty cycles 40 percent um and then i was experimenting with going faster i like i had it spot on earlier so i can i just undo it some more what does my undo history have i don't think it has anything else that's a bummer um it being too fast means that these numbers are too low so let's just mess with them by making them a bit higher so let's and let's let's leave so okay what numbers do we have here to play with we have this delay this is after the after it's set high so this is uh there's always the pulse always starts high so this is the first high period and then there's this branch not equal and it skips the the there's two clears when it goes down if it's not equal it does the second one so this uh second delay here is the middle third of the pulse and then there's the final third which is here there's two places the final third is it's either here or it's here this delay here is um the ending delay if you're loading a new bite of the neopixel so we have four numbers to adjust and i just want to try to do the like oh it's so meta yeah that looks correct yeah yeah that looks right mark so i just want to um i want to tune this back to what it should be um because i've messed with it so much like new pixels are actually pretty flexible i think if i just realized that it might actually be the hard word it would have saved me a lot of trouble but now that you say is just like oh yeah clearly the red's just not working um i agonized over that okay what do i need to do i need to make this gap longer i'm gonna make it 16 so this is the middle i'm gonna make the middle longer let's make this longer too 14 i was doing this yesterday i do this trial in there what should you be seeing when you start up you should get yep i think it's actually three yellow blinks in 700 milliseconds or so that's when safe mode is and then you should see if your code errors you'll see two red blinks every five seconds if your code finishes you'll see one green blink every five seconds and if it's running you won't see anything um is what you should see oh and i had a whole problem i was trying to use gdb and gdb was just like hating me that's why i'm not even using the debugger like i was in gdb and when i did tar ext to the j-link it would just infinitely like allocate memory and like cause my whole computer to be unhappy yeah it should go bright white and no ripple okay so this looks good still so the neopixel still happy with it let's see how we are in timing oh that makes me so happy we have to test the m0s though still because the m0s are having the same problem we might need to do the same cache one quicker way to do this is to actually change the neopixel pin maybe i'll do that so the salier code's happy with it now you can see that there's these little pink boxes because the salier confirmed it okay look at that so the zeros are i know it's probably really tiny for you the zeros are 34.15 duty cycle and a frequency of 813 so they're just a smidge fast and then the zero the ones are 813 as well and 67 so they're both just a hair long i think what i would add i think what i would add is just a one or two more in the last empty i think it's i think that should be right make that 15 could be a mechanical failure yeah i mean i would potentially see that with a microscope right if if the bond wire for the red element died i mean i'm not nice to these boards because i've got so many of them i have a usb microscope around here summer i mean i'll just probably order some more feather and pores i know how to get more i don't need to rma or anything i could just order them um okay let's try this timing interesting to look i think it's i do know where it is what if i get my head real close i get almost see them that's why i have you folks to help me out all right so it is blinking let's just take another capture who i caught them i'm like slightly out of the view aren't i i'm holding it on the led wow look at that 696 796 at 33.6 796 at 66.08 you should give away your old not totally dead m4 boards well i think i've i've definitely had more feather and fours in the past i think i have given them away if you ever meet me in person i usually do give them away like i've got like four m zero boards right here okay if anybody wants this newer build i think this is the timing that i'll go with so let's call that done and then um yeah i'm in seattle and i'm going to be fully vaccinated soon so we could have coffee or tea or something um let's try the m zeroes let's see if it works i don't know what's on these but they've been in the drawer so long and that i assume that i don't care what's on them ah maybe what we should do is actually let's show the difference so here's an old version i i have no idea what version of circuit python this is running it is running circuit python because it's blinking like circuit python but let's actually take a capture of the old led behavior since we have it on here and i'll turn up a blind myself figuring out which is the pin this goes i love it when i'm poking around a board and i accidentally like short it with the lead oh did it crash maybe i did crash it okay so here's the normal air the current error behavior of circuit python it's actually a lot quieter than i thought that would be which is good i guess so there are large gaps here and then smaller gaps so like this is probably like it's the green yellow green yellow line number so it is important to note that like after this the led is actually still on the whole time so even though we're not transmitting a lot of stuff which is good the led would be on for that period of time so here the current implementation here is actually coasting at like 900 and 78 kHz 939 922 okay so let's um that's a good comparison and zero express uf2 copy here so we got safe so the led pattern is working oh it's in safe mode so this is what it does when it's in safe mode and it's too far away from my proximity sensor hard fault uh oh that's not good hard fault handler my gdb is not working that's what i would use to debug it and see if it all right well i've got oh we're about out of time let's just see i also have metro m0 metro m0 has a swd character i can't push this i'd love to send prs out right before i go off for the weekend curse of live debugging demos yeah i just i'm surprised it's crashing i should delete i have a lot of um it's not doing anything hello so the m0 is not even safe modding it's possible this is this is zero or not i mean i'm sure i can recover it but i don't think it's a prototype oh you know i copied the feather m0 over that's why that'll do it okay it did show up so it's safe modded too interesting it's safe modded but it clearly safe modded from something on the drive there's a bunch of stuff here why is it safe modding what are the odds that my gdb is happy with me now i don't think they're very good so the the it is important that the blinking is working like the timing of the blinking is working but let me delete all of these prints because they do mess with the timing yeah let's give it all this have all i have like debug blinks as well let's clean all this up i think all this debugging stuff i had previously is no longer useful and i'm bad about leaving it in nothing in there yeah next start raw ticks oops i shouldn't have actually need that these two i don't next start raw ticks idea and where is this main c four seven eight three how is your gdb connected i was trying to connect through the g-link server if it keeps crashing and i'll try to figure that out unreference count ports all debugging stuff that was kind of useful so i what i had was a pin toggle every time that the um um every time the real-time clock uh or real-time counter interrupt happened i would toggle which would give me an idea about um oh that was working whether the interrupts for that were actually working or not hey it's no longer save modding because of the debugs and it looks like it's working i think this is worth just pushing it is interesting there's a tx pin here um and why is that going off i thought the tx pin would be going on oh we're printing new status color still we have more prints more prints to delete in status leds but new status color delete there's one more i think um should we show rebase so i think this is correct so um what i'm gonna do is i'm gonna get add all of this current version of the code and i'm gonna commit it as law two two and then get my pgp key don't show it don't show it don't show it copy that's how my commits are verified so i've committed this just as a bad commit name so if i do get log you'll see that i have simplified status led i have blah debugging blah and then the actual like commit name and so i think what i want to do is i want to i what i want to do is i want to make these three commits one commit that says fix for a cnd or something um so what i'm gonna do is i'm gonna actually rebase it uh do i actually want to do that maybe not rebase can i do i and then you can do head minus three four so i can do pick and instead of pick i can do reword and then these next two are fix ups so my goal is to have the individual one is the absolute newest builds from the six three x branch or the seven x branch so they're gonna be a mix actually i think so usually it's just for main but the six three x branches should be should be pushed as well i think so you may actually you might want to compare the commit messages between the two um are all those prints just redebugging why not comment them out yes they're just redebugging and i delete them because they're rarely useful in the future fix timekeeping rtcu sink disabled caches just needed adjustment okay all right so now if we look at our git log we'll see that we have this simplify version and this one and i apparently pushed it which is a bummer because i think like this is the one that the pr was done on if we kept debug prints but commented every other common then every other line would just end up having one in my code over time yeah i use vim for git work not st yeah i just i do i do use vim just for small stuff i don't use it for like day-to-day programming just like when i only have a terminal i'll use vim okay so the next one i want to do is i want to i'm gonna get i i think i'm gonna sublime merge will have stuck with me a little bit longer so i want to take a look at what the commits have so here we can see that i i accidentally push these other two things so i don't want that um but what i want to do is i just want to make sure that like yeah see here in main like there's this stuff that i didn't comment out yet so these are like extra blank stuff that are commented out that i do want to delete as well so that's what that diff is really nice for let's delete that and this won't show these immediately see here's an extra line here for skip repl unlike there's no need to have somebody review that so i'd rather just delete it so delete it deleted deleted um oh yeah i forgot this if time to next change is greater than zero then do it but you actually always want to do it because even if time to next change is zero you want to make sure that you continue if you don't set interrupt after ticks you'll end up sleeping too long i think that must have been the m0 problem uh neopixel penton doesn't need to be protected from reset anymore uh drive strength oh i should undo that i don't need to change that so that's an digital i o i was just i i'm so glad that i brought this up on the screen i was like so disheartened with why red wasn't working only to have somebody be like it it could just be broken which is great um okay so that is changed back these timings we do want to change and i had to add this extra timing and then i deleted that and here's another print in pwm out which we don't want either so this is when i do use rebase because like i put a debug print in a place that like i really don't mean to change right i was using pwm out just to verify that the clocks were set up correctly like i was going to think how crazy would it be if the samd 51s are all clocked at 48 megahertz for ages um i did this woken up stuff i think i'll leave that in um feather nrf turning on the neopixel that was just a mistake and then here's a commented out print that i'll delete as well in status LEDs okay doki so now what i'm going to do because i basically want these are all changes that i want to make on this commit what you can do is if we do get status and then get add all the things so now get status we'll see that they're staged um but now i want to do get commit dash dash amend and so that will add these changes to that existing one um and so if we look back here in merge we can now see that like there's fewer files and we just have the changes that we care about so yeah so that is what we want so we're going to get push 10 new and we're going to force at least because we're going to go back in time or we're going to go to a different commit because they accidentally push the debug commits there i should could have kept them locally um so they don't show up on the pr but okay so now if you go to the pull requests uh we have this simplify status le save power like the reason not to get rid of that first commit is because like naradox comment here is on that commit um so it's good to just whatever people have commented on i try to leave um so now we can see that i i pushed that commit again because i was force pushing stuff and now it's it's the build is running on the fixed sandy commit so that's super exciting thank you i think it was um yeah christian thank you for uh pointing out that that could be my problem um yeah and i realized that um okay so let's wrap up i forgot to turn the light on this little front lady in here see it it looks better right with the overhead light on as well even though i have the front light too um oh and cat the cat is he's in the his third option which you can't see i'm getting ready to end that's how you know so thank you everyone for uh joining me on this deep dive next week we'll be on friday as well i'm happy to see that the um the led stuff it looks good um please test that commit uh or that pr let me know if it works on it doesn't work on any other platforms it's possible i am not that thorough a tester honestly um patrick you should definitely check out the earlier bits i showed some of my broadband map stuff off which i think you might be interested in um and talked about the fact that the local broadband thing here passed as well which is exciting or it was signed by the governor um let's see if you want to support me uh support adafruit by going to adafruit.com and purchasing any of the hardware that you've seen um thanks again for everyone to hang out um please try circuit pipe on if you have not some people have it if you want to hang out with us uh outside of this stream you're welcome to join the adafruit discord server by going to the url adafru.it slash discord um yeah check that out as always and thank you so much for hanging out um i will see you next week on friday um and enjoy your weekend and if you have the opportunity to get vaccinated for covid 19 please do so um i'm going to get my second shot on monday and i'll let you know next week how uh how that second shot goes it should be fine and i'm excited about it but um yeah i'd like to be open about it i would encourage everyone to get it when you can so um i'll kick over to cat cam and give wake the cat up and give them some pets and then we'll be out of here for the weekend so thank you all and we'll see you next week do you want to say goodbye to people have a great weekend everyone