Folks, if you're watching this after the fact, make sure and check the description for time codes. We're going to take about 10 minutes or so to get going here. And it's going to be a long stream, so I recommend if you're looking after the fact, check the time codes. I think we'll just get going every day. Get everything going. I'll pause all my streams and stuff. If you're in the chat, say hello. I'll start by just saying hello to folks. I think everything's OK. But it's always good to get things going a little early to make sure that everything looks OK. Hello, Keithy EE. Thanks for saying hi. Is the audio and video all good? Is it two weeks ago that I had the video stuff? Han says hi all is OK. Thank you. Hi, Narodoc. Hi, Andrew. Hi, Ismael. Thanks for stopping by. Again, like I said, if anybody has questions, I'm happy to answer those early. Otherwise, I'll do housekeeping in about six minutes or so, given everybody a time to get going. Keithy EE says, sounds good. Looks good. Live on Twitch as well. Thank you. Yeah, I said it back. Hi, Peter Graf. Hi, MD Roberts. Hope everyone's doing well. Ham's lab says, hi, Scott. I'm just walking home from a BLM protest. Oh, good for you. I don't know if you know, but we have kind of a standing BLM demonstration. I wouldn't say protest, but a bunch of people go and hold signs out by the quarter and by the corner every Friday afternoon. So I actually usually do that after the stream. I have this sign that we have up in the house that's really awesome that says, be welcoming. Kindness is everything. Black lives matter, all that stuff. So awesome. So I'll do that today later. Hi, Rick. Hi, working well in Michigan. Dots. Oh, PT stopped by, I think, saying, stopping inside to say hi before meeting for me. Happy 200 boards. Happy 200 boards, everyone. We'll talk about that a little bit. But it started early enough for Phil to check it out. There's an internal meeting during the stream every time. That's why if Lady Aida shows up, she shows up later. It's because she's in a meeting beforehand. I haven't been to Michigan for a while. My partner's family's from Michigan, and I like it. I miss seeing that side of my family. Cat Cam has been rearranged. Andrew says, not sure what the deep dives usually cover, but I'm trying to learn how to do tightly timed things like MIDI sync out using Circuit Python. What frequency of MIDI sync out do you need? And is it out of UART, or USB, or BLE? I think generally for audio things, except for the actual sample playback, Circuit Python is kind of well within the tolerance. Keith E. E. E. says, where in the doc do I drop questions? You can put them in the timestamp ones, or you can just post them here, and then folks can move them over to. Hi, DCD. Thanks for joining. Good morning, an unexpected maker. Yeah, I haven't seen actual comparisons. Generally for tightly timed things, we use this underlying C stuff. So for pulse timing, and we can get down to a microsecond or microsecond-ish timing, I haven't done a whole lot of MIDI stuff, so I'm not sure kind of what the thing is. T minus 2, 15 minutes. Oh yeah, I should clap. Clapping is really, DCD, are you ready? I'll clap so that we can have a time code to sync up with if we need to. And I know that there's probably a lot. So I'm going to clap in 3, 2, 1. We can use that to sync if we need to. I'm wanting to do USB MIDI out from a Trellis M4. OK, so I think the MIDI sync should be able to keep up generally with how fast the USB is going. Of course, there's always things from Python. The problem with the challenge with Python and doing timing-sensitive stuff is that you normally in C, I'd set an interval timer and surface it with a sync out message each time it goes off. Yeah, you could certainly do that in circuit Python if you wanted to. We have the lower level MIDI stuff that you could set that up in C. The challenge with Python is generally garbage collection. So if you're doing something that is turning memory, occasionally you'll have to free it and do some administrative stuff. And that's really where you're going to get potentially really long pauses. Hi, Joshua. Keith Ease says, due to math, MicroPython is looking at adding complex numbers as default D-type, but it comes with a space cost. So I was curious what your thoughts are on it, whereas I don't understand enough about the underlying design to know if you could just import microlab complexes and alternative. Yeah, so I don't think so. You could probably do some tricks under the hood to do that. I really don't use microlab myself, so I don't have a good feeling for what's valuable enough. Certainly in the course where you have space, I don't see why we couldn't just add it. But the modularity of NumPy itself is not very well-defined, like the fact that D-types are kind of like this under the hood thing. So that's kind of just like NumPy is not meant to be modular in this way. So ooh, some more questions. So will the Raspberry Pi 400 and Cyberdeck work with a hyper pixel four square? I don't know, Ryan. Sorry. Joshua Fogelsen asks, why is stuff on Adafruit way more expensive than other places? I wouldn't say it's way more expensive, but the point is that you're getting a lot more than just the thing. You're getting Adafruit support. You're getting all the software that I'm paid to write. You're getting support on the forums, all of the software, all of the tutorials. It's unfair to compare just the device versus everything you get the device and everything else. And this comes up. We see people posting on the Adafruit forums asking, hey, I have this thing. How do I use it? And it's not an Adafruit product. And we have to tell them, go here. You bought something from this other company. It's not our job to help you get going. That is the privilege that you get with Adafruit is that you get access to support, whether that's both the people or the software. You can use the software on other stuff, of course. But we're not going to help you fix it or get it going. And that's actually incredibly valuable. So while the individual unit thing might be more expensive, the reality is you're getting a lot more for your money than that. Hi, Joshua Harwood. Dylan also points out, also better testing and quality control of Adafruit products.  And if it happens to get damaged in shipping, you can reach out to Sport and they'll either help you fix it or replace it for you. So there's a lot more to it than just the device itself. And sometimes it's hard to recognize that. OK, let's do some housekeeping. Hi, Johnny. I think if I want a retro Pi setup not portable and I want to sound which Raspberry Pi should I use, if it doesn't matter, I will use a Raspberry Pi Zero W. Yeah, I think so. I haven't done a lot of Raspberry Pi stuff, so maybe other folks in the chat can help. I think a lot of audio goes out the HDMI link. Joshua says, I'm no longer a customer of Adafruit because I can get the same thing way cheaper on Amazon or eBay. If you want to do that, that's fine. But don't go to the Adafruit support forums or this chat and then ask about how to get something working. That's what you get for using Adafruit stuff is you get folks to help you. That said, the Adafruit Discord server has plenty of people that are knowledgeable about things, and a lot of them are helpful and they're not paid by Adafruit, so there are places as well. Rene from Twitter asks, all right, I guess I should kick. Hold on, sorry. Let's I'll take a pause on questions while I do housekeeping so we can get everything kind of officially kicked off here. And sorry if there's background noise, I have the window open. It's actually like kind of warm and sunny and nice here today, which is great. So, hello everyone. My name is Scott and I work on CircuitPython for Adafruit. CircuitPython is a really easy to use version of Python designed for microcontrollers, which are inexpensive little, ooh, I'll show this one. So what we got here is, so the microcontroller here is this chip here. It's really tall, inexpensive, or really small, not tall, small, inexpensive. It's a little tiny computer. This one runs at 64 megahertz, I think. And this is a Circuit Playground Bluefruit. It's an all-in-one device. It's got a bunch of Neopixels and buttons and speaker and microphone and all of that stuff. This runs, I think, $25. So it's a great all-in-one getting started learning electronics. I've been using it for testing some Bluetooth stuff that we can talk about a little bit later. So that's CircuitPython runs on devices like that. Adafruit is an open-source hardware and software company. So that's some of their hardware that they design and sell. So that's how we make money. That's how I get paid. I get paid by Adafruit to work on the software for this hardware. So if you wanna support me, you can do that by supporting Adafruit at adafruit.com, purchasing some stuff there. If you wanna chat with me and a lot of other stuff, a lot of other people, you can join our Discord server at adafru.it.discord. It's hosted by Adafruit, but we don't mind people talking about non-Adafruit stuff. The line we kinda draw that we were talking about before housekeeping was just like Adafruit paid people pay to answer questions for people who have bought stuff from Adafruit. So this is a deep dive. It happens every week, normally on Fridays at this time at 2 p.m. Pacific, but occasionally it's shifted to Thursday at 2 p.m. So I'll just try to give heads-ups about that. It typically goes for two hours or more, so buckle up, it goes awhile. I got good sleep last night, so I shouldn't fade out quite as much as I did last week. Questions are always welcome. If I'm in the middle of talking, I'll go back and try to catch all of them. One thing is the cat who's in the corner here, that's Spook, he is epileptic, so if he has issues, I'll just be watching him and making sure he's okay, but he's been doing really well, so I don't expect that to actually happen. So that looks like all the housekeeping. Let me say hello to some more folks and answer any more questions that came up, and then we'll keep going. So yeah, Naridoc says it's also unfair to compare cheap bear devices with a feather that does battery charging and all of that, for example. Yeah, it's true. Boards are also about form factor and what are on them. Sorry, let me pull up the Twitch and ban the person who just had a spammer on Twitch. Oh, I'm not logged in that's why. This is the joy of moderating while I stream. Sorry, folks. I should have been logged in beforehand. Nobody wants to buy followers, right? Sorry about that and I'm getting echo too. It's pretty quick on Twitch though, it's like right behind me. I think that worked. Anyway, okay, so sorry. Okay, let me look at the YouTube chat. Bruce says it's a, here it's a beautiful day, around 20C in the sun, just, it was just out on my bike. Yeah, it's beautiful here in Seattle, just south of you. Peter Graf says, I always remember something I need slash want right after I place an order. Yeah, what I do is I usually have an open cart of stuff. I'm in a weird spot, right? Cause I get stuff for free, but that's kind of how I keep track of it is I just have always, if I don't need something immediately, I'll drop it in my cart and buy it the next time I, I make an order, make an order for a prototype for example. Hi Gladius. Hi Paul. Joshua says, I'm quite knowledgeable of electronics, so I don't really need the help from Adafruit. That's totally fair. That's totally okay. Yeah. And that's fine, like Adafruit knowingly hasn't like targets the audience of beginners because that group, the group of people that don't know electronics is vastly larger than the people that do. So it makes sense from like pick who our customers or focus on which customers. And a lot of stuff that we do for the people that are, like design for the people that are, a lot of what we do designed for the people that don't know electronics, like actually benefits people who do as well. Whether it's just stuff to reference or code to start with, things like that. Gertz says, so has Billy going, great progress last couple of weeks already getting excited. Bruce says, also no people around us we are between seasons love being alone without all the road bikes blasting past me. Mark says, or you can be like me and forget you dropped an item in your cart and next time you order put it in again in order too. Awesome. Well, thank you. Thank you to everybody who does order.  Okay, so Gertz is asking about Billy but I just want to touch on a couple of other things before we get to the Billy stuff. Gertz, let me know if you can't stay for the whole two hours and I'll reorder but I do want to talk about a couple of things first. So let me switch to the desktop and spoilers that's in the note stock. So first off, I wanted to point out the project bundle and I could 1825 is the time code here. Yeah, so if you go and learn what we added and I wasn't directly involved in this so other people deserve the credit for here. Gareth is here for the duration fully buckled. Awesome, well thank you. So project bundle is really exciting. It's something that other folks have been working on. I haven't been working directly on it but the idea is that you can go to a learn guide and you can just download a zip file of all the files that you need to run the whole project. So if I click here and open the learn guide we can see the parts I need and then I think what we need to do is we need to go here to the software part and then, oh, I love it when pictures load late. That's the best. So here's how to get started with CircuitPython and where is it? If we just skip to the code, you can see now there's this nice big button that says download project bundle. And what this does is it downloads the zip file so I'll click that and it has the zip file and I'll just open it here and we can see what's in it. So here you can see there's a code.py a readme and then in the library there's just the libraries that you need for the code.py. Now this is like super, super cool. This has been a long time coming. Like we haven't had a great story about, oh, you can see the plant better in this view too. We actually hung some plants up here. So this has been a long time coming from when we first started doing the library bundles that just have like a ton of everything and the problem was that they like no longer fit. And then like once we had Blinka, we had reason to like maintain dependency information between all of the libraries so that if you pip installed something, you'd be able to say like, oh, I need this and this. And so what this project bundle stuff is doing that like Melissa did some of the work, Justin did some of the work and I'm sure I'm forgetting folks. So sorry for the folks that I'm forgetting. So what it basically does is it starts from example code and it figures out all the libraries that are imported. And then once it knows those libraries, it can bundle those libraries plus all of the other things, plus all of their dependencies as well. And then there's also like, like it also includes non-code files as well. So if there's any fonts or images that are in the learn guide repo for that learn guide, those will be included as well. So it's really meant to be just this like download a zip, copy all the files over and it just works sort of thing. And we're very excited about it. I know we're gonna talk about BLE a little bit later and Gareth was talking about this, but one of the things that I wanna, would like to see is a Bluetooth app where with like a circuit playground that I was showing earlier, what you'd be able to do is just open this app on your phone and then pick a project, transfer them all over and it would just work. Like straight out of a box would be really cool. So that's the first thing, the project bundle. And I think we're, yeah, we're very excited. Unexpected maker says that's very cool. So kind of what we're expecting is like, we're seeing this and learned, but we're also expecting to see it in like a couple other places. Like there's the circuit tool that ask Patrick W has been doing some work on and some other folks as well. And so circuit's been great. CIRCUP is a command line utility that allows you to just say CIRCUP and it will update all the libraries that you have on your board. That's really convenient. And it's using a lot of the same information that the project bundle is. And then I think Melissa's also been looking at integrating CIRCUP and like this project bundle stuff into editors like VS Code as well. So there's gonna be some really cool things coming down the pike with us now that we kind of realized we had that data and like I've cleaned it up in the places we needed to. So this is just gonna be good. Naradoc says CIRCUP is amazing. And Joni's in the Discord too. Awesome, okay. So that's project bundle. If you use learn guides and do that, this should get you going even faster, which is really cool. The next thing I wanna point out is the, we hit another milestone. Last week we talked about one year of deep dives. So if you, yeah, CIRCUP Python is kind of geared towards board to board things. So if you go to circuitpython.org slash download, so what you can do is you can find all the boards that kind of work quote, out of the box. And so this is a really neat page here and there's lots and lots of stuff there. It's sort of by popularity. So you can get down into these like not like brand new boards that aren't like fully released yet or this like Game Boy thing that I made that nobody has a copy of and I don't even use. And this one's a new one as well. So we cross the benchmark of 200 or we're directly at 200, which is quite incredible. It's like for 200 boards that people could purchase, they can just come to the site and they can download CIRCUP Python for it. And the experience across all of these boards is pretty uniform. Some have displays, some don't have displays and blah, blah, blah, but all up like that's pretty wild. So congrats and thanks to everybody who's added their boards here. So that's cool. And one thing that we're pointing out too is every time we do a release, we sort this by the number of downloads. DCD says 200 boards, how many different CPUs? That's a good question. I think, you know, ports wise, we have what? Sandy, NRF, ESP32 S2. Sandy is really 21 and 51. The RP2040. IMXRT is another, so we're what, like, Randy says I have the Game Boy board, I just haven't tested it yet. Yeah, yeah, I mean to re-spin it with RP2040, I think that's gonna be better than the Sandy 51. Renee says, I'm really happy for CIRCUP Python for the novice and young programmers intro. Yeah, STM, thank you, Nerodoc. Speaking of Nerodoc, there's this other cool thing that they just added, since we're talking about cool stuff. I don't know, over, Feather S2 is number 12, nice. Yeah, I've been wanting us to publish download numbers every day, but we've been switching it up how it's done, so maybe we should do that. All the download numbers come, we host all the downloads on S3, which is the Amazon web services file hosting thing, so we have numbers for that. Where is the Nerodoc words? The filter thing. Gee whiz, so how many of them will be available over the next few months, hashtag chip shortage? That's a great question. I think time will tell. I know that Lamor has said that the mainstay, like the circuit playground express, not this one, but the other one, they order in large, large quantities, so they have a good backlog. Is that the top modules? Core modules? Ah, there you go, perfect. So I think we're very happy as Adafruit that we have a variety of chips that we support because the chip shortage is hitting different people in different ways, so we're feeling pretty good in general that we're gonna have some products in Stocksdale, and then the other thing is that it's a really good time for us to focus on the software side. It's giving us a chance like Dan's doing a lot of really cool work for USB that maybe we should add Dan back on in the next couple weeks to talk about when he has a PR out, but he's doing like being able to change the USB descriptor in Boot.py. So if you wanna like have a specific hidden descriptor for a particular reason, or you don't wanna turn the storage on or all that stuff, we'll be able to do from Boot.py, which will be cool. And then I'm working on the BLE side of things, so it's a good time for us to not really, Jeff is working on the IMX RT, so we are doing some kind of platform specific stuff, but generally we're kind of focusing on like building out our software and our workflow and our experience stuff right now. Gary says plus one for Dan. Ryan G says, any plans for the NRF 53 looks like it would need Zephyr due to being only supported in NRF Connect SDK. I haven't looked at the NRF 53, let's see what it is, third generation. Oh, interesting, NRF 53 840. I haven't been watching what they're doing. It's two Cortex N33 processors. Hi, Daniel. Hi, Hugo. I would say we don't have any immediate plans. I think it's really cool that there's a network core and an application core. And 512 kilobytes low leakage RAM. I think cost is the other thing to consider, but I don't know if, well, Moore has been looking at this or not. I think once we have Bluetooth stuff, it would be worth looking at. Yeah, DCD, that's the link except for EN latest, not 6.2X. Keith E says, the changes and improvements to the software of late has been a delight to watch. I'm really excited to see the code ecosystem mature even further. Yeah, me too. This is actually really interesting time in circuit Python land because of we just tagged 6.2 stable. So 620 is out. It's stable and we've kind of designated that the main branch is now 7.0. So it gives us a window of opportunity to do some more dramatic things. And I actually have something in mind that I was meaning to do. Bruce S says the NRF 5340 doesn't look that pricey. I should see if I have one. Yeah, I'd be curious. But again, talking about the chip shortage, like it's gonna depend on whether we have, like whether we could get chips or not would be interesting too. BTET says, any obfuscation techniques if you want to make Python code unreadable slash hard to read or protected for prying eyes. Generally, no. Like the MPY config is like a bytecode version. MPY version is like a bytecode version, but all the strings are the same still. You might be better off trying to just secure it. If you want security, like turn the mass storage off and then you could do things like flash chips sometimes have the ability of scrambling the data between the flash chip and the device itself. So that even if you're like plugging onto the flash chip, you can't read what it's reading. But security is not something I've done a whole lot of. So yeah, generally it's not something that we think about. Okay, what I was gonna talk about that Naredoc did is this support matrix. It's on the circuit path I'll read the docs, but you can filter the boards by what they have. So if you wanna know what boards have like alarm, which is for the deep sleep stuff, you can just type in alarm and it will tell you the 19 out of 207 boards that we have that have that in there. What is a good example that we only have limited? Like maybe I think you could do two as well. You can say what have alarm and terminal IO, which is all the display IO stuff. Daniel says, wouldn't the one megabyte flash in the NRA 53 limit the core modules available in the circuit Python build? Yes, potentially we'd probably have a second. We would probably still have an external flash because one megabyte flash is pretty tight. So if we had external flash for the file system, when megabyte flash is actually quite large for the core itself. Of course, with Bluetooth, we would share that with the Bluetooth stack, but we would probably just have like external flashes are kind of like two megabytes at the minimum. Two megabytes to 16 megabytes is typically what you see and what we use in our boards. So like, we probably wouldn't put the file system internally, we would probably just have it externally. Yeah, so this is really cool. Thanks to NairDoc. NairDoc's been just doing some really cool stuff. Some improvements also to like the circuit Python downloads page as well. I think you can now, if you filter by like Bluetooth, I think, yeah, it goes up into the bar too. I think NairDoc fixed that as well. So really cool stuff. Thank you to everybody who contributes to circuitpython and circuitpython.org and stuff. Okay, so how are we doing on our list? First, oh, before we get to Bluetooth, I wanted to talk about GitHub Actions. This is something I did earlier in the week. Talking about support, support can be a real challenge. We have like 1500 GitHub repositories under the Adafruit thing. Oh, and that reminds me. I also didn't talk about, did I talk about this? So this github.com slash Adafruit is kind of all the stuff that we as Adafruit want to, oh, then the NRA53 network core has its own flash and RAM too. That's awesome. Yeah, I think it would be cool to support the NRA53, but it's not high on my list. So let's see, where's the count? Yeah, like 1500 or so. So these are all the things that we support. And it's important to say, like it's important to us for us to well-defined things that we as Adafruit, the company want to support or not. Renee, I see your question. Sorry, I'll get to it in just a bit after I finish this thought. So one thing we're doing, one thing I did, this is the thing I thought of when I thought of this, we actually have github.com slash CircuitPython, and we've started to use this. We now have some people added from the community as well, and we have a team for the graphics stuff that folks have been doing. So this is something I'm really excited to grow. I'm excited to grow the stuff that we as a CircuitPython community support separate from what Adafruit supports. So this is gonna be really cool. It's just the early start, but I've always said that I want CircuitPython to be bigger than Adafruit. And so I think this is, we started to see groups of people, teams of people working on shared stuff. And so by having github.com slash CircuitPython as the place for the CircuitPython community supported stuff to live, I'm super excited about that. So I think that would be really cool. Garry says, risk five for the next CircuitPython chip. So we have risk five support already with the FPGA stuff that somebody merged in. The CPU cores are not that interesting because the competitors just support them. But I kind of expect that we would probably support the ESP32C series as well once we have a Beely workflow that we can use because it doesn't have native USB. Oh, so let me get to Renee's question before I forget. So Renee said, do you by any chance have tested TinyML on CircuitPython? So we haven't. I'm aware that there is like a TinyML for MicroPython, I believe. I thought I saw that somewhere, but I'm not sure. Maybe I was making that up. It's something that we're thinking about. One thing when we knew that it was coming for the RP2040, so when we picked how much of the external flash to set aside for CircuitPython proper, we actually left a lot of space, hoping that that would be enough space to fit TinyML on the RP2040. So it is something we're thinking about for sure. And I'm not working on it personally, but higher effects, Lucien, who works on CircuitPython for Adafruit is wrapping up some awesome low power stuff for the NRF. He's doing the review for the NRF 52 low power, and he's doing the low power for the RP2040 and did it for the STM as well. So once he wraps that stuff up, I think he's gonna take a look at whatever work there is for TinyML from CircuitPython. Renee says, perfect with stars in their eyes. Minnesota asks, how do you keep mindful of need to update the time log? I think I need a timer or something. Yeah, David usually does it. DCD in the Discord chat is awesome and does most of the time codes. I think they're based on the time codes on YouTube, but I'm not positive. But yeah, thanks to David as always for doing that. Okay, so the other thing with popping off the context stack. Yeah, Minnesota says so very useful in their review. Yeah, the time codes are great. Thanks again, David, for doing that. So the other thing is that it's pretty common with CircuitPython libraries, we have this continuous integration tests. These are automated tests that run whenever somebody proposes a change. And we found that it's like the output of those and finding the problems is quite difficult. So I did some work the first couple of days of this week to make that easier. One thing I did is, and this is Lady Aida's idea. So if you make a poll request, this hasn't rolled out, I don't think yet. But the idea is that when you make a poll request to a CircuitPython library and it fails the workflow, you'll get this message from GitHub ActionSpot that says, Garry says less of a stack more of a pile. Yeah, I like my piles. You can, I have a pile on my floor right now. So yeah. So GitHub ActionSpot will post this thing with some helpful links to say like, hey, it looks like tests failed, point you to where they failed. And it will also point you to the learn guide for doing pre-commit and Sphinx and also to the Adafruit Discord for help. So that was kind of like Lady Aida was replying to a lot of people with that info. So she was like, can we automate this? So that's one thing we automated. And the way it's done is it's actually GitHub Action itself so you can see like, oh, publish this action to the marketplace. But what you have to do is you do have to change the workflow for each individual repository to just use that action. And what it does is it actually, so one of the challenges is if, say you have multiple workflows fail, you don't wanna post multiple times. So the question is like, how do you do that? The way that I implemented it is from the bot, we mark it with the eyes thing that the bot is looking at the pull request. And when you do that from the API, it will tell you whether the reaction existed or not. It will tell you like, yeah, I created it or it's okay, it already existed. So what the bot does is actually assess the reaction, sees if it existed or not. And if it was created, if it didn't exist, then it posted the message. All the other times it won't post the message. So that's one. And then, so the other, Han, I'll get to your question, I'll get to questions after I finish this thought. So the other action that I made is, this is called the CI problem matchers thing. And what you can actually do from of actions is you can set some regular expressions that basically match lines of your log file. And they highlight them in red, but also they like end up showing them in different places, which is like super, duper handy. So here you can see this is like GitHub inception. It's because it's pictures of my GitHub in a GitHub page. So the first thing you can do is on the summary of the workflow, you'll now get a list of annotations and this pulls out. Like you can't, you don't have much control about what these messages are. That's why they're kind of like not helpful. But at least they're highlighted here that when before they weren't at all. But then it gets more helpful when you look at the log output. So you can see here that like the individual lines are highlighted now that match the problem matchers. So it highlights all of the like, it highlights what black reformatted, it highlights all of the pre-commits that failed. And it will also pick out a pylons that fail. And when pylons fails, it actually, pylons will give you the file name, the line number, the column and the message. So those actually end up in the file view. So this last screenshot I have is on the file view of my test where if black reformats it, it tells you the file. So it ends up at the top of the file. And then the, if there's a line number associated with it as well, it'll put it in the file. So that, now we have a thing that says like, oh, it looks like it failed. Here's a link to where you can see how it failed. But here's also help to do it. And then this work will bubble up and make it more obvious what things failed on the library itself. So I'm pretty excited about this. Hopefully it won't confuse people. Hopefully it'll help them. And I actually do have a third poll request that does this problem matcher thing, but on the core. So that the core, so that the core will highlight what boards and language combinations failed. Hackaday has a new stream called the deep dive. They should have me on it. David says time codes are synced to the PC clock and then adjusted as needed. Okay. So those are the things and hopefully Dylan's gonna help roll those out. He's gonna roll those out. So that'll be super helpful. Let's, so I'll do questions. So Han asked, I've tried to install MicroPython on the RP2040 feather, but I was unsuccessful, which file, unsuccessful, which file do I need? Found one broken link on the Adafruit site. I know they merged it, but I don't know if they've released it yet. If we look at poll requests, you might need to build it yourself. I don't know if they have nightlies or make for different boards, but that wasn't merged. Yeah, it might need to be made yourself. I haven't actually looked at those. I should. You can see there is an Adafruit feather RP2040 definition, but I don't think it's on the, like MicroPython has some of the board listings. If you go to their downloads, but I don't think they have everything. And then I don't know what we have on the product page. Generally, we hope people would use MicroPython, but I think you're right in that we did put a MicroPython link, right? This is a little out of date because I think they released the Arduino Unicor. So yeah, they got rid of, Raspberry Pi got rid of their MicroPython fork completely. It's just an upstream MicroPython, but we don't have pre-built stuff. If you want to help me out, I can't edit these myself. So what I would suggest is email support and let them know that that link doesn't work and they'll figure out what to put there. They'll at least edit this, so it doesn't say that. I think that there's also the getting started with RP2040 site. I know that there are some MicroPython links here as well. And like they're highlighting that there's multiple boards. I don't know what they're, that's I think for the Pico only. If you want to try a MicroPython, what you do is you go to www.circuitfython.org slash downloads and then the feather RP2040 and then just hit download. You need a .uf2 file that will go on the RP, RPi-RP2. I'm biased, I think this is a great way to find how to download CircuitPython. Gareth says I love the bot, but I would add a sentence to say that if you need help from a human, come on Discord. Yeah, if you want to change it, propose a change, the CircuitPython action library failed this one. Oh, I thought that was right. You can make a PR. I'll show you where the text is. Action, see I failed. And then it's in this index.js. And you can see the text for the body of the messages right here. So if you have thoughts about it, go ahead and post those there. Hansa, CircuitPython is working for me. Gareth, I'm a kind of purist just to see if I'm able to get it to work. Yeah, I think you might need to build it yourself, unfortunately. Oh, Yuri has a deep dive on Raspberry Pi Pico in RP2040, I'll have to watch that. Okay, so we're been answering questions. It's like pretty warm in here. I probably, it's one of those things where I probably shouldn't have had the window open while it was hot outside. It's like I learned it every year. File transfer protocol stuff. Yeah, let's talk Bluetooth, shall we? Let's just show. So the place to follow for this is, or if people don't know, let me take a step back. I for years wanted, because we produced this, the CircuitPython Blue Fruit is like a year or two old now. And what I wanted at the time we were working on this and I still want is I want to be able to use a phone or a tablet, which I have over there to program Bluetooth devices over Bluetooth. And I've been really gung-ho about this idea for a long time because I know how many people start the first computers that they own that are theirs are not, they're not desktop computers, they're not laptops, but they're phones or tablets. And so as working for Adafruit and really trying to aim for the people that don't know electronics yet, being able to open programming and electronics to people who don't have like computers and keyboards, like physical keyboards is like incredibly important. So I wanted to do it for a long time, but I've just like finally, once I got all the RP2040 stuff done, had the cycles and the focus to work on it. So one of the core pieces of that is being able to transfer file contents across over BLE. And so this is kind of like, somebody pointed me to R-Sync and I forgot to look at R-Sync, but there's also like FTP, like a very basic like list of directory, delete a file, write some stuff. So I've made this library called Adafruit Circuit Python BLE file transfer. And this is where we're experimenting with the protocol to transfer things from one device to another. And I've had this open pull request where I've been working on it and I need to fix that. I was hoping it would be fixed. So Trevor, I'm working with Trevor, he is doing the application side. So he's an iOS dev that I work with. So I've been doing all the meetings with him as well. He's working on this app called PyLeap, which is totally subject to change. And the goal is kind of like the bundle stuff of just like just shuttling files over, but then we may also want to have ways of like editing the files that are on the device. Minnesota Mintat says, how much data how frequently? So I think it's assumed for me that like if you're iterating on a code.py, you're talking a few kilobytes at the most relatively frequently. But if you're like loading a bunch of stuff on it, it might be a lot more data kind of like once. So I'll show you what we have. So there's this pull request. So if you have thoughts, unexpected maker says, got it any faster than 10 kilobytes per second or yet. I did manage to see some numbers of that, but the numbers I'm getting right now are actually a little bit lower than that. I'll get the demo going because I had it going earlier, so I should be able to, I'll show you what I got. So I do have the overhead here as well. So let me just, I think it can maybe fit it all under the overhead. I can at least do this. So this is my mouse trackball hand. But I've got this USB cable and this feather. Let me, haha. Nair doc says, wait, accessible to people without a PC? It's too easy. You're making it too easy. That's what I do. That's my job. My job is to make it, and nothing's ever too easy. There's always problems. Okay. So I'm plugging this side in and I'll just see. I have this. So they are right next to each other. So some of the speed stuff is probably subject to changes things. So that's all I did. I already had code on here. And then let me pull up the terminal and I used TO, which has been really nice. So I just do TO to one and I think it could pop out a second one. TO to the other. It's possible that they're not named. So if you ever do connect to a circuit Python and it doesn't do anything, and this is actually, no, it gave me a dot. My keyboard shows up as serial as well. So this is the one I don't want to talk to you. And in fact, let's just list. Oh, you know what? I do have a switch on this. So it's possible that I, if I turn this switch on, ACM one is now connected. So I think TO zero and TO one. Are these devices? Hopefully. There we go. So the one inset is the one that's acting as the client. It's the thing that's like writing to the other device, different files. And it's doing a series of writes and reads and listing a directory. That's what this is. And it's writing other stuff to files. And it's just doing that every 20 seconds. And you can see the rates that I'm getting right now are I'm getting about five and a half kilobytes per second writing in about six reading. But if I do, let's see, if I pull this up. So it's the feather doing the writing. So you can see I have two removable drives. And I renamed the, it's usually circuit pi is what it shows up as, but I have a boot.pi that renames it to keep them straightened out. So if I open code.pi here, here's what you'll, this is all the demo code here. And what I'm doing for that kind of like larger file speed test is just a, oh, I didn't know there was a sleep in there. I had a bug that needed that. Let's see if that changes the number at all. Yeah, so it's about five or six. Hi Dave. So it's about five, but this is only a one K file. I actually played around with this a little bit yesterday or the day before. And let me switch over to desktop. You don't need to see the boards. They're not doing anything interesting, at least right now. So I changed this number from 1024 to 4000 and I'm gonna hit save again. And then we'll see that this auto-reloaded, this is how circuit pi then works. So you hit save and it restarts the code for you. You can see it's connecting. And there we, the right speed, there is just over 11K, K bytes per second. So I'm pretty happy with that. And that's seven the other direction. So if our file is like under that, Garrett says, so wait, did you get a 2x speedup from last week? Somewhat? So some of the speedups that I got were because of the protocols designed for the server, which is the thing that you're storing the file. The server dictates kind of the rate that the data is transferred. And so that changing that number about how big the chunks are before you like say, like before you communicate again, can change the rate. And then there was an error with reading where like circuit Python had some problems where if you, in Bluetooth terms, the writing is done via a write no response command or whatever over Bluetooth, which means that like it gets written to the other device. It's reliable, but there's no confirmation that the application code got it sent back, which means that you can send repeated write no responses much faster than if you're waiting for the round trip again. And then the other direction, if it's a read, it's like a series of notifies, which is kind of like the reverse of, which is the reverse of write no response. It's like notify, but I don't care if they actually heard. Notify has some weird constraints as well about like how big the packets can be. And I've been finding circuit Python bugs amongst a lot of this stuff. So the version that's running on these devices is actually like I have a PR out for some fixes for it. MinnesotaMentat asks, have you tested the upper limits? I'm not sure what you mean by upper limits. All my testing is pretty basic. I try not to get too wrapped up into all the details of things. There's certainly more speed ups we can do and I'm okay with leaving those on the table. One of them could be like, there is actually Bluetooth 5 has a two megabit per second transfer rate instead of the one. Ah, Minnesota is speaking of sustained speed for larger files. I mean, we could see like, we can raise this number even higher and just see how it changes. It's writing just to, so the other thing that this isn't taking into consideration is it's not taking into consideration the flash write speed because on the server side of this, it's just going into memory. So we got a little bit more of a speed boost here. I think some of it's gonna vary a little bit with how well your data kind of fits into the packets. Like if you're doing like thousand or I think right now it's set to do 4,000 size chunks. If we just go to the circuit playground and look at the other side of this, you can see there's this chunk size parameter. So if I turn this down and just do like a hundred bytes at a time, that's gonna really slow us down because like Bluetooth itself can't do larger individual packets. And it's possible I'm gonna break it too. It's like generally pretty resilient except when it crashes like this. So this is just with that like hundred chunk rate which is the, and maybe it's broken. Oh, it's just slow. I think it's working, it's just slow. Gareth says it looks like really good speeds, even a bundle of some audio video assets would be tolerable. Yeah, I think like the most data you could ever want to send is kind of like the limits of the flash size, right? So 16 megabytes are about like the upper limit of what you'd ever transfer kind of in one go. And yeah, it would probably take a few minutes at this rate, but ideally it's just once, right? Like it's, I'm more concerned about the like how fast is it to iterate than it is to like dump the bulk stuff over. So it's interesting to, it's important to remember like, you can always iterate on stuff later. So here you can see our rate speed is actually only, was only like 1,100 bytes per second. And an 8,000 back, which is makes sense because chunk size is dictating how fast you can write to something. The chunk size coming out is still large. So yeah, this chunk size is basically gonna end up, I think the size of like the file system writes, right? Like it's probably gonna be 512 or like this, this chunk size is meant to allow you to have like a limited buffer that you're doing internally. So it might be like 1,000 or 2,000 or something. But yeah, as Patrick W says, did you talk about how Circuit by then gets onto these devices that are be the only, will that be a per chip manufacturing process? That is a great question that is something we're gonna need to solve. I believe the blue, the bootloader on the NRF 52 boards we sell does have a Bluetooth mode, but I haven't looked into it. So I think it's a great question, Patrick, and it's one of the things that we'll have to figure out. Alvaro says, you need a dev null for Circuit by then so you can bench the wireless speed only. I mean, that's basically what this is. It's just storing the data in memory. But I think it's pretty likely that these numbers will increase just after I implement it in C as well. Because Python is a bit slow. And the Python that I wrote is definitely not optimized either. Like it's doing struct packs, which are doing allocations and things like that. So it's the Python version of everything that I'm doing here, it's really geared towards being kind of a test bench of the protocol not to be like and I'll be all best implementation of it. It's meant to be like, I was trying to unlock like Trevor working on the app side, for example. And shout out to David Glad who pointed me to Pete Warden, I think it's the guy's name, who does like tiny ML for Google and he like just created his own BLE file transfer protocol as well. So I'm hoping that like the timing of this is right and we'll see a lot of adoption. One thing I did do, and maybe this slowed it down a little bit is that folks can tell me if this is a good idea or not, but the change I just made is actually to add padding. So I actually added like empty bytes to some of this stuff so that like it's usually like byte byte and then something and then like four byte integers like larger numbers. And I wanted to make sure I was like, you know what thinking ahead to when I'm implementing it in C, it make it a lot simpler if I got a packet the like four byte values were all aligned to four bytes so that I can basically just cast it to a UN32 array and then just read the values out. And so I just today I was like, I tried to ask Dan and Dan missed my message so he didn't get back to me but I was like, you know, it's probably worth the like a little bit of extra overhead to just have that be convenient. So if you look in the latest change of this protocol like you'll see that I'm adding these Xs and destruct pack and those are padding bytes. So the struct is awesome. If you're doing, if you haven't done a lot of Python and particularly it's really good for Python unembedded struct is just really handy for going from Python objects and numbers down to a byte string. So struct is really good for that. Unfortunately, I did find a bug instruct today so I found and fixed that. So there's a PR out there for fixing struct pack which was broken, slightly broken. So yeah, I think in my book this is kind of where I want the V1 version of this protocol to be. Oh, I should also point out one piece of feedback that Dan gave was it would be good to have offsets. So it's a way to kind of like make sure that you stay in sync as things get transferred over. So there are now offsets that are sent. So if you're reading, if you're reading data back every time you do a chunk size, you'll get a header and that header will have the offset of the data going forwards. And then what he said also is like, oh, and that would make it really easy to put an offset in the command itself. So we actually have offset in the commands now which means that you'll be able to write starting at a particular location of the file which means you can append. So you'll be able to append and you'll be able to like write the latter part of a file potentially. You won't be able to like write just a bit of it. Like maybe you could do that. I'll have to figure that out. But then you can also read parts of like start. You can read a suffix of the file if you wanted to. Yeah, I'm gonna sentiment that. Here you were regarding struct. Yeah, struct is great. All right, so that's where we are. That's where we are. I think I'm definitely done with this for the week. The next big thing for me is I think I've gotten all the feedback I expect. So I think next week we'll be about getting that working in Circuit Python Core which will be very exciting because that will start to allow us to actually write to the actual drive. And then Trevor is working on the app side and he got the app connecting to my tests code that what I'm running in this test as well. So on his side, he should be starting to implement the file transfer protocol as it's laid out here but on the iOS side. So we'll have an app to test maybe in a week or two that can read and write files either to this fake stub or whenever I get the core stuff working to the actual file system, which would be really cool. And I should have brought the fan in here. It is. I'm glad I'm in shorts. Okay, so that's any other Beely questions? I do have one last thing that I wanna do which I thought would be a good, it's a small work item that I think I can do for the, during the stream. I do have like a number of pull requests open that I've gotta check back with. Oh, this one failed. Oh, thank you, AJ. Let's just try that. How nice of them to fix my test. That's weird that it, like the pre-commit worked, okay? That's a nice of them to fix it. Okay, so I don't see any questions. I think I bored you all. The last thing I thought, this is a thing I was thinking about doing and it came up in some of the support stuff recently but let me go back to the overhead and show you what I'm talking about. So I'm gonna eject the circuit playground because we're not gonna use that. We're gonna move on overhead. So here's the feather. And you can see the Neopixel here is green. It's kind of hard to see. And maybe I, let me go get acrylic because I'm gonna talk about this LED. This bag does the same thing. Let me go get LED acrylic, I'll be right back. So what I have here is just like, it's this LED acrylic from the shop that like really nicely diffuses the LED. So what I wanna do here is put that on top and I'll even zoom in. So I wanna talk about what this LED does. That's what I'm talking about. I'm sorry if there's cat hair. Perfect. So this is the RGB status LED. And ages ago in CircuitPythonland, I had this idea of, Todd, that says you need a laser cutter so you can cut the acrylic smaller. Yeah, I don't have the space for a laser cutter nor do I have the patience of like tuning mechanical things. I had a 3D printer for a while and it did not work out. I think Robert says, always out of stock that acrylic. I think you can get it from TAP Plastics as well. They might have it. Seattle Makerspace has one. Yeah, yeah. I don't do mechanical things. Do you not understand that? Like, I will use a giant piece for a tiny thing. Okay, so I think this is good because now I can put it off to the side and we can watch it blink. And maybe I even, which it's hard to tell which way is what. B2Graph says, I don't have the exhaust for a laser cutter. Yeah. Mechanical, what about your Christmas projects? That, PCB design is about as far as I get. You're right. Okay, so we have just the feather plugged in and if we, this is the feather. So here's what happened is I control seed and now it's doing this blinking. Has anyone, CircuitPython has done this for years.  My theory is that the answer is no. I've seen people when I've been doing support say, oh, it's doing this particular blink pattern. Can you help me? Can you help me diagnose what's going on? And it's always like, no, like, no, I can't. Like this doesn't give me enough information to really, G-Wiz says, for BLE, is Android on your roadmap? I think yes. We're gonna do it with iOS first, but I think our intention is to do an Android app as well. I know that FOMI guy who's done Android development as well is really interested in it. So yeah, I think Android is going to be that. So I think the line number, it's blinking, so it's blinking the line number. So it's like exception type, which file or which file it was, what exception type and then the line number. And it's actually line 250, but I'm not sure, I'm not sure it's right. I just counted it and I don't, anyway, I don't think it's useful. The response whenever I see this on the support forum is that people should just connect to the serial, right? Like the serial link is what we're seeing here, which is actually telling us what the exception was. So that's not very useful. It takes a lot of code. It's like not simple to like keep track of the flashing. And then if I restart, we'll see that it's green. So green, solid green right now means that somebody just linked to react native Billy. Yeah, so I keep the, I suddenly want to try using OpenCV to decode it. How is this not known? Why hidden? So we do have a page, we do have a page to help you decode it. We wrote something up, but the reality is that like it's just too hard. You know, I added this before we had like, if you have a screen, it shows up on the screen. And so, and also when the code is running, the LED is on. And so when we were doing low power stuff, I realized this LED is a problem. This LED is a problem for low power and it's a problem for, and the blinking pattern is a problem for what do you do if you're on a battery and your code crashes? So I think what I would like to do and tell me if somebody thinks this is a really bad idea, but I think what I'm going to do is I want to change the way the LED works. When circuit by then is running, and like I said earlier, 7.0 is a perfect time to do this. Those major milestones that like top number, that like leftmost number is all about conveying to people that some things have changed. And so you may need to change your code, you may need to change your understanding of the workflow in this case. So I do have, there is an issue actually open for it. And it might be labeled, we have this label, oh, not bug. We have this label breaks API, which I don't know if I marked it as such. Oh, so this we should do, maybe I should do this too. So breaks API is how we designate. These are the things, these are the things that will cause people to potentially have to change their code. So yeah, Minnesota, my point is with the blinking that like, even though we tell people they don't really know. Garrett says, but how about a high-frequency flicker that can be decoded with a mobile app to print out error codes? Just if you're going to do it with a mobile thing, then just do Bluetooth. I don't think that LED is the right way to go. And let's try to find that. Let me just look at LED. Yeah, it picks the LEDs remain lit up from code when entering the REPL, that's something separate. I know I marked it as 7.0 because that was kind of the conclusion like I was about to do it and revamped status LED signaling. And just says, while playing with my new Neo Trinkie, I found it about the blinking because it messed up and it was still doing something, took a bit to figure out. Yeah, so I think what I want to do, this is what I was thinking about this earlier. So simplify the indications, do not repeat them indefinitely. So part of it's saving power. So I think what I want is actually if your code is running and doesn't set the NeoPixel, it's off, which could be weird. And then I think what I want to do is if your code is running, NeoPixel is off unless you're using it. Two, if your code fails, if it failed with an exception, blink a red LED every so often, maybe twice every so often. And then two, if your code is done and completed successfully, I think that's still a reason to blink because your code finished, it's not running anymore. And you may want to know that. And in fact, maybe what we should do is, let me just copy all the files over because I want to back this stuff up again. Or maybe, no, I'll just rename this. Really test. Yeah, I guess as my LED to phone camera is a decouple link doesn't spend on pairing just a lot. I know, but you're not gonna be able to fix it anyway. Like it is interesting to think about, but I just don't, I don't think the complexity is actually worth it. That's kind of where I've come. So here, I just did an empty code up high, which means it'll finish immediately. And now we see that it's breathing, ramping up and down. This LED acrylic is perfect for this. And you can see the red flickers. The red flickers are actually file system accesses. I was thinking at the time that it's really like a, it's like a USP key. But I really think that, I mean, maybe the file system stuff is okay, but I would worry that it's a red color. I think that could be confusing for people if the way that we convey that an error happened is through red blinking. I wouldn't want file system stuff to be confused by that. So I thought what I would do in the next like 45 minutes and what I thought would be for the stream, is I just wanna delete all that code. Actually, I wanna strip it out. And I think I wanna, I wanna do these like very much simpler things. Like imagine if it blinks red twice every five seconds or something like how far apart does it need to blink for you to realize that like something bad happened, right? That's all, that's all the blinking I think should be is just like an error happened. And then you have to level up. You either have to connect to the serial over USB or in the future Bluetooth Ability. Naredoc says, I wonder if it would be interesting to have a remember the last exception that happened when it's not connected to USB feature somehow. Because it's often an issue debugging things along running device or that happened on battery. Maybe through a special file similar to boot.out. Yeah, totally. The other thing is there's a pending PR, I think, that Christian Walters started. He was doing switching the file that runs after Code of Pi. Naredoc says it's not even worth code to delete all that. No, it's not worth code. I wanted something simpler. Christian Walter also has a thing that stores the text of the exception and hands it off to the file. Like you can say like on air run this other file next. And he did some code that stores the text of the exception that stopped the last file and handing it is going to hit it off to the new one. So there's some work for that already. And I think that's kind of like the right direction to go. Todd Butt says all new circuit by thumb boards have a hard-wired klaxon that always plays unless something is wrong. Yes, Gareth points out is it important to consider people who don't have full color vision make maybe make the blink rates unique for each color? A hundred percent. Yeah, for one, Dan has doesn't have full color vision. So he'll find it real quick. And then also if we don't actually depend on the color alone, we can actually apply that to boards that only have single LEDs as well. So yeah, I think that's the right way to go. All right, let's get a new branch started and just delete some stuff and see where we end up. So I'm gonna move, I don't know how to move this back in. I'll just leave that over there. Although maybe I wanna, I might actually just wanna J-link it. It might be faster to iterate. It certainly will be faster to iterate if I J-link it. Okay, let me, so I'm not gonna use this plug because this plug doesn't have a disable enable on it. So I'm gonna plug the J-link in and this is why the regular feather in RF52840 is great because it has that. And then this USB plug that I've got is on a switch. So I'm just gonna, oh, and I should show that too. Did you see that? So if I unplug it, let's see if I can do the acrylic. Oh, you know, I can unplug it from the other side. Let me do that. So the other thing I wanna show is that the LED does do stuff when it starts up and I think I do wanna leave that. And that will be like, you do wanna be able to tell people that like, yeah, it's working. So if I just watch what it does when it starts up. So I unplug the other end and now I plug it in, it should be, yeah. So it's red, yellow, and then the other stuff. So the yellow bit is if you press it then that's when you can get into safe mode. And so I do still wanna do that. I do wanna have like these durations at the start that on power up, specifically power on reset is what it's called. I do wanna have times that are like safe mode. And then for Beale I want it to have a chance to you can kick it into like pairing mode as well that way. Can it say okay and Morse when it boots? It could, but part of the dicing about deleting code is that it could potentially also save some code space. Okay, so I'm gonna J-Link to it. That's gonna make it really easy to iterate. So this is the first step is running the J-Link GDB server. And then I'm actually gonna switch Fetch Adafruit. Get my SSH key going. I always restart before the stream. So now I can do get switch. And then I just found this. Oh, I'm gonna have update. It's asking me to update my J-Link firmware. Yeah, let's do that. If this breaks my J-Link then that's gonna be sad, but so we'll do that. Oh, it disappeared. So this is a syntax for starting a new branch which I just learned today. I'm gonna call it simplify status LED. So we have a new branch. It's based on the latest code. And I'm gonna make the feather. But first I'm gonna clean because I switched branches.  Yeah, even though I'm using the command line it still decides to pop stuff up, which I don't understand. Oh, and I need to have my Python. So we'll blast through this. Yeah, it didn't use to pop up that loading bar. Okay, so there's the build stuff. Let's find this code. So it's in, this is like my everything project. So it's in supervisor shared RGB LED status. And it builds and I'm gonna connect the debugger to it, which will make it easy for me to iterate. And we should see that like it stopped fading because the J-Link is connected to it. Is there a command line argument to suppress the J-Link pop up? I don't think so. Oh, dash no gooey. Maybe. Oh, you know what? And I didn't do a debug build. So I don't know why it's trying to read symbols. J-Link's going. What's going on being for a GDB connection? GDB is unhappy. LEDHF debugging. High frequency debugging. What is it doing? Okay, give it dash nine. Does that only kill? Here we go. Force quit. Maybe it's because I didn't make it with debug symbols, which I'm okay doing. Oh, I love this computer. It compiles so fast, although it makes my room real hot. Okay, that works. So for some reason it really wants the debug symbols. So I have, in my GDB init, I have these shortcuts and Sager wants to pop up a window. So this is just loading it. Horse code hello world. And then this other says I do enjoy watching your work like an ASMR thing or something. Great. It's like being in an office with me. I am kind of noisy then too. I'm usually noisy because I'm listening to music. Okay, so if we hit C, we'll see that it started up. So this is just a high tech for kids. This is just the stock code. So now let's see if we can't find this. Oh, well, we're in this code. So let's just delete some of it. I was like thinking about this, going to sleep last night and then. So here's the line numbers, digit sum, safe mode, exception color, found main, pattern start, total exception cycle. I don't think we need any of this stuff. Make dash J32, I hope it compiles fast. Indeed. Oh yeah, sorry about the birds. The crows like to sit out there. Okay. LED status and net. Oh, maybe it's not in this. New status color. So I do want all this status stuff still. It's the animation that I want to change. Okay, yeah. So prep status, animation, pattern start. We may want found main, total exception style. So basically, we do want okay, but all of this specific stuff. Like see, we have all these colors for different types of errors. I don't want to do any of that. David says, sorry I'm late. Was with a friend long time no seeing and gave him my circuit playground express so he can discover a circuit pipe on our make code. Awesome. Thanks David for doing that. Kind of reminds me when Netscape used to have the pulsing N logo. All right, well, I deleted all that stuff. Here's the ramp up and down. Otherwise, exception cycle, flash the flag. File color, flash the exception color and the digits. So we're not going to do any of this. So we do want to do blinks. So I might want to re-engineer how it blinks though because ideally if we do like blinks five seconds apart, we want to sleep in those five seconds or whatever it turns out to be. So we don't want to ramp. So I don't want to do ramping. And you know what? I think we do want this tick diff and we do want safe mode. So I think we do want if status okay. And yeah, if status okay do that. The return of blink. I did this stuff really early on. I think it's been a long time that CircuitPython has done this. Yeah, so I did want to tell you whether it was main or boot, but we're not going to do that. We're going to do that. And all I want is if status, not okay. New status color, deleting lines. Maybe have several states like error or panic and then associate them with colors and blink rates. That's kind of what we do already and that's kind of what I'm getting away from is like we had all of those, like if it's this type of exception, do this color. And it's actually in this file here. But I think like you can see here is like mapping error colors. I don't want to do that. Don't want to do that. I'm not going to do line numbers anymore. All good. MS exception. Cycle active, right. This is a color. Oh, you know, we do have a REPL one. Should we blink when we're in the REPL? I want to delete this active, right. I don't think I want to do that either. I have a lot of possible colors. Blink means pay attention. That's exactly what I'm saying, Karith. That's, yeah, that's, you're hitting the nail on the head, right? Like I want it to be that like, yeah, if it's blinking, something is happening. So like it needs your attention, exactly right. Like it could be your code finished and that's fine. Or I think, yeah, and that makes me think that we should blink in the REPL as well. Because if for some bug reason you end up in the REPL, like or your serial output's not showing up, if it's blinking like white, and I think we'll do different blink counts as well. But yeah, I think these are the three colors. We'll probably want a fourth one for Bluetooth. And then maybe we'll want like counts. I think we'll just, I'll just do counts, like one, one, two, one, two, three, one, two, three, four. Like I think that would be simplest to do. No, I don't want to do Morse code. I want it to be simple to describe. So like three blinks, three blinks is this, two blinks is that. Yeah, Daniel says maybe they make the Bluetooth color blue. That's why I'm not using blue here. I want to have like, I think if you start up, it'll be like a yellow pause, right? And if you click reset during that, that will be safe mode. But then that will be followed by like a blue pause. And like if you hit the blue pause, that will trigger you to go like restart and start up in pairing mode. Which is funny also because in pairing mode, I think we do want to do LED animations for some boards. DCD says perhaps the AR app could decode the colors for those that have colored decode challenges. I think in general, you just don't want to rely on any one way of doing it. And some folks are talking about Morse code. And I think that for boards that have a buzzer, that could actually be interesting as well. Like the Roomba that we have, if it's like off its charger and it's about to die, it will actually like make noise. So potentially like, potentially the blink pattern that we create here, we could actually also do like buzzer pattern. And just like Gareth was talking about, like that's, it only does it when it needs attention. Sort of a thing. So I think what we want is, I think we're going to want count. So if we leave this stuff here, biostiagnostic beep. Yeah, we should see what patterns they do. I think maybe we want like a standard gap length. So maybe we call it LED sleep time. And then blink time. And then maybe we want the number of blinks. So define all done blinks. One. I'm a little worried about safe mode is probably going to be the rarest. I might make that four exception blinks. So this is like the number of blinks. I think the more blinks it is, the harder it is to count. Ruffle running. Three. Something simple like that. So if we do LED sleep time milliseconds, I think if our difference is less than that, right now for prototyping, in the long term, I think we'll actually want to sleep. If we can sleep, we should sleep.  Maybe we do want total time. And we could also just set color up here. There's no reason for us to do this if statement every time. Color. So basically what I'm thinking is like, we'll just collapse all this down into new status color. Status color. Too many blinks. How about gently breathing as an additional signal? The reason that I don't want to do gently breathing is because of battery use. Because I'm thinking about that blink count being like five, 10, maybe even 30 seconds apart. Although I think 30 seconds is probably like, oh, I thought it was working, but you have to think about how long you have to look at it to know. So like five seconds is maybe as long as you want. But yeah, I don't want to do breathing like this anymore. Because it's constant. I mean, it's PWMing, but it's constantly on. And I'd like to like, in order to do that, it's doing a tight loop to do the animations. Whereas I'd rather just like straight up sleep as deep as we can for a while. Like do a sleep for four seconds, right? And then do some blanks and sleep for four seconds and do some blanks. Because I am like, we've heard these cases of like, I want to do a little power stuff, but if it crashes, then it sucks more battery, right?  And that's kind of what, again, I like what Gareth was talking about, is like you blink for attention. So, color. And the reason to do this now is that now is a great time because we're early on in like the 7.0 cycle, relatively, I think. And then we're going to also do status. Blink count, all done. Blinks, right? Yeah, DCD says the initial shipped demo code can blink to show off features of testing, but totally agree about having five plus seconds between blinks. Yeah. Yeah, I think, you know, if you're, if you want some demo code to perhaps call HCF instead of blinking the LED, much easier to detect. HCF being halt and catch fire. I don't think our customers would like that if we were catching their stuff on fire. I love that show though. Just call it the Sparky. Safe mode blinks. Yep, David points out if it's monocolor, it'll also work with boards that have no RGB. So the RGB is not a mandatory circuit Python feature. Yeah, yeah, that's the idea is that the blinks would, yeah, the blinks would go in a monocolor one, which we do have definitions for already. Oh, and you know what? We don't have a REPL. Oh, the REPL doesn't, blinking during the REPL is going to be harder. It'll be white for now. I don't need to do that now. Exception blinks, blink and blink count. It needs to go here. I think it's just color. We might want total time as well. Yeah, DCD says should the function name change? Probably. I think you're right, because we'll wanna, I'll like, I can do this for prototyping on the stream. Like we're, we only have like 15 minutes or so left. But I think that the, I think you're right in that I'll, I'll probably want to get rid of this. Like I did this, these functions for the purposes of like factoring them out, but I think I could actually probably move them back to where they were in the main.c file. And that would allow us to do the like longer sleep stuff, which is definitely something I wanna do still. So yeah, this is subject to change, but let's just see if I can get it going. So I think what I wanna do is maybe what I wanna do is actually, so the question is, when do I wanna restart the clock? So I think I wanna restart the clock when the tick difference is greater than self total time. I'm thinking about what if we actually blinked at the start of the cycle and then slept, blink and sleep, blink and sleep, blink and sleep. So this would then say if ticked if, is greater than like total blink time, set it to black once. And then that will be the like sleep duration. I guess that won't happen once. Blink count times. Do we have a definition for how long the blinks are? One second blinks? No, I don't think maybe a 10th of a second. Blink time MS. So we're gonna do two times, two times blink count times blink time MS. And then if ticked if divided by blink time MS. Wait. So I'm trying to think of like my division versus mod. So I'm basically gonna say like, in one case we're black and in the other place we're the color. If we're less than blink time, we're good. And I'd like this to be, right? So if we take ticked if and we divide it by the blink count, is that what we want? Think so. I think I wanna actually divide it by two times the blink time, blink diff equals tick diff divided by two times blink time milliseconds. So that would give us which blink number we were on. So what if we do mod instead and then blink diff greater than or equal to blink time. So in the second half of that time period we're black, otherwise we're bright. And there's this weird period where, okay, I think that's right. Maybe, probably not. Let's make it again. Nope. It's a blinking state machine. Each state has a list of durations on and off. You just browse the listing to sleep at the end. Yeah, we could do that way if I wanted to be more generic. Oh, I didn't. It loves to load the file even though it didn't work. RGB status, pattern start. Ooh, we do want a pattern start still. Do want that. Cause that gives our tick diff. But then we have all these other things. 365. Nobody should be surprised that it didn't. Okay, so status okay. We don't need, we'll just do it here. We don't need found main. We don't need safe mode. We do need pattern start. New status color. Let's not do that. Cause we're gonna be blinking. Get us closer. Yep, I think I got us closer. Safe mode 365. So we don't want to pull it off status, but we do want to read it. I think humans often struggle with more than two or three blink patterns. That's why modems have so many LEDs rather than one multifunction one. Yeah, yeah, that's why above all else, the whole goal of this is just to, above all else is just to say like, hey, like something's wrong. I think that was the, you know, that's kind of what I'm reacting to is like the idea that I was trying to just encode too much information. Let's turn off the flash flickering as well. Journal flash status color. As cool as that is, I don't think it's useful. Of course it doesn't matter besides being confusing, because if you're doing USB writes, you probably have power. I guess you could be on a laptop or something, but like, if you have a laptop and we're not, no, we're near the same amount. Brightness 387. Oh, where does brightness come from? Is that a past in here? No, slow blinking, fast blinking, too fast blanks and then pause. Yeah, the other thing to consider is that we do blinking in the boot loader. So ideally we wouldn't do the same sort of blinks that the boot loader does. Oh, that's not right. What brightness got used? Was it in the, let's pull up the original version of this. I'll sign myself, I'm doing it. I'm doing it, I'm getting rid of all the fancy blinks and supervisor shared LED status. So where did the brightness come from? New status color doesn't have a brightness. Did I make that up? Oh, here we go. Oh, it's for the ramp. Okay, we don't need that. I think new status color actually accounts for like a global brightness. Sweet. Well, that's less math that we have to do in here. Remember total time. We'll do this here. Total time equals status blink count times blink time milliseconds times two plus what did we call the sleep time? If you have to define the different sorts of blinks then you have a problem. You're so right to simplify it. Yeah, that's what I'm getting at. It's just like people understand it's trying to be helpful but it's not helpful enough to actually be helpful. If that makes sense. 362. Like we have better solutions now too. It if we can do an app for phones that will decode the blinking. BLE is a much better option. 283, main running, rebel running. Oh, I just want to delete those. For now main won't do status color. Fake sleep. That should be, ah, maybe we'll set that just in case. We're running, we don't want it. Sure, there's a crowd that would appreciate the, ah, chain link right over there. The challenge of a Morse code stack trace. Four fast blinks, two hearts, remember? I don't know, I'm missing the reference. All right, we compiled, let's run it. Oh, we're getting our blink. The yellow blink is the charging. So this is every two seconds. I like how long the blink is. Everybody, I don't know what frame rate you're getting on the stream, but like that rate, it seems pretty reasonable. And I, but I think it could be a little bit more spaced apart. The status color is right now it's two. I wonder if five is, okay. So let's reload. And then we'll do the, we'll cause some errors here in just a sec. I was like slower exactly. How many lines of code just for a blink? That must be the most complex blink code example code. Yeah, but it's, two blinks is often called a heartbeat. So four blinks would be a time lord hearts beat. Nice, I like that. This seems pretty reasonable to me. This is five seconds apart. Neoduck said somebody mentioned that the board didn't come with a decoder ring when I explained to the boot loader pattern on the S2. Press boot while the LED is purple. We actually have a good diagram. So this is every five seconds. I wonder if 10 seconds is probably too much. I don't think I'd go, I don't think I would want to go over 10. If folks have any last questions now is the time to ask them because I'm running out of steam, but I'll at least flick on USB and see how it goes. So it is nice that it blinked promptly. Like then the way that we did the pattern, it blinks at the start. So it's not like it, not like it would like throw an exception and not blink for 10 seconds. It will blink immediately. So if I turn on the data, and so we don't get the flickering from the drive because we turned that off. It should be the deeply relaxed heartbeat of an athlete. Is that the description we should have in the 7.0 notes? The LED now is like a calming pace. Okay, so we are done. Is this configurable? So now we're in the repel and the white in the repel is still going. Blinking faster and faster, as Lauren's lawyer may be a message too. I think the problem with doing that is like, if you have a pattern, you have to figure out how long it is. Bad Abby says, yeah, we could set that. That's, I think that would be reasonable. We could just have to like supervisor dot something and then we could set the time between blinks. I think that would be okay. Like if you are doing a battery sensitive thing and you wanna say like, it's okay just blink every minute or 10 minutes or never, I think that would be okay. All right, let me just iterate on this so I can cause some errors. Raise runtime error. How easy is that? Ooh, I like that. Just two quick red blinks. Oh, what's that two? Or is that one? Yeah, that 10 second gap is a bit much, isn't it? But it does it immediately, right? So if you're iterating and you're trying to fix it, you'll get those that blink feedback immediately. So there it is again, but see if I hit control S and I save it, I immediately get the like two blinks you threw an exception. Vita asks, what is the flickering? So the flickering is there's a second LED on here that's the charge LED and it flickers like this because it's basically floating when you don't have a battery plugged in. So if you were actually doing like a battery sensitive application, you wouldn't have that flickering. Yeah, so nice. I wonder if I do import storage or supervisor or let me just do it from the rebel. I was gonna try to get into safe mode because that's the last thing that we did. I'm really liking this. Do folks, are folks okay with this? Supervisor. How do I, oh, run reason. No, not run reason. How do I set the, oh, is it, it might be part of runtime. How do I go into safe mode? Folks thinks 10 is too long. What do you think, five? Five is better? I thought I could get into safe mode from user code, but five or three, Todd bot says. Moto Timo says simple is better. This is a good refactor. All right, let's eject. Badabby was gonna say four, okay. I do kind of wanna push it because the longer it is, the more you can sleep. Can we have a Python mockup code to discuss and test various blink without recompiling circuit Python? I'm gonna leave that as a challenge to the reader, but I'll set it at like five. And as we have beta, as we can switch it, I'll set it to five, because I buy that 10 is a little long. I think five might be about right. I'll have to pick this up. I'll pick this up next week and I'll post it as a draft on the stream here, even though we're a little late, just in case people wanna play with it, but did I remember to shut my USB off? Oh, microcontroller.run mode. Thank you, Daniel. You would think I would remember that. Maybe the blink code should be frozen Python code. No, the reason that is a frozen Python code is even bigger than C code. Okay, folks, we'll test this. Let me just reload. I'll load it with the five second gap. Bop, bop, I like that. Yeah, I think it's a little long, the five seconds, but it's not that long. And I would rather push it to be a little bit long, because I was also thinking it should be long enough that you can say like count to five, right? Like one thousand, two one thousand, three. Like you could say like, okay, like how long does it take? Okay, let's try safe mode as the last thing here. And then I'll push it so in case people wanna try it. Where did my, where'd my TEO go? Oh, microcontroller, that's my problem. On next reset, microcontroller run mode, safe mode. How long should be on the, should be the on time. Eyes can detect blink even a very short. Yeah, we can make that shorter. Right now it's a 10th of a second. Ah, there's this bug. There's this like outstanding bug on NRF. So that's four quick blinks. I think the problem is we all think a second is shorter than it actually is. Do LED pattern rhythms. If it's the baseline to JAWS, it's a boot up high error. If it's Beethoven's fifth, it's a problem in code up high. If it's the Peter Gunn spy theme, Wi-Fi couldn't connect. Do you think that's too, is that too blinky? What is the flash rate for seizures? That would be worth thinking about. I've always assumed it was. Yeah, I agree that it's like hard to count before. Oh, that hurt. Yeah, the other flash is the, I think it is four. Maybe one thing we could adjust is we could make the gap between the flashes longer. I don't really want to make the flashes themselves longer because that's like power usage. But one thing we could experiment was actually like spacing the flashes themselves for the other part. Actually, let's just try that. I know we're over time, but I think what we do is we just make this three, this total time is three as well. One, two, three, er, yeah, charger. All right, we're just about done folks. Thanks for hanging in with me. This is how it's done. This is the deep dive. We got our snorkels on last reload. So I think if my brain is right, this should, it's now three, like the blink time is a 10th of a second still, but now it waits two tenths of a second before blinking again. So it should be the same length of the blink, but they're further apart, which I think is better. Let's just get in safe mode again. Oh, you know what? Let me show you a trick. For those of you who have circuit-piling and compiling, if you go into, so we're in NRF, say you wanna test it, you wanna test safe mode, you can always fake it. Supervisor port, tick init, port init safe mode. So what you could do is you can cheat. If you wanna test it without having to enter it, so this is just a like, it's gonna pretend to be a watchdog reset. So we'll reload. Todd says, I like that better. Yeah, good. The larger gap between blinks, I think that helps. And right, like I'm trying to optimize for how long the LED is on. It's okay if there's like more time spent off. How was that? Yeah, that was much better, wasn't it? We could even go even more aggressive. Do we wanna, we could make it even further apart, maybe that. So we try to even make those four. I'm just kind of curious, because that did help it. Let's just have a magic constant in three places. There we go, let's just try four. It's A, B, test the two. I don't get that fancy. It definitely makes it feel, that's a smidge slow, maybe? Maybe not. How do we like that slow for? What if it's folks thing? Do you like that or the three? Either way, I'll factor it out. Would blinking two alternating but close colors make it easier to count? No, we don't wanna rely on two. DCD and G with say four is the best for me. Okay, what should we call it? We should factor it out. It's just like on fraction, I don't know what. Naming is so hard. It could be like off multiplier. It could be a ratio on off ratio. Three or off on ratio, I think that's right. So it would be off on ratio. That's one. David says, wait, your web stream is 30 frames per second. It's filling in LED. Are we well positioned to judge the in-person pression? Comparing what I'm seeing directly and what I'm seeing on the screen is fine. Like the rate of blinking is so low that I imagine it's okay. As long as we're getting the right 30 frames. Exactly. All right, let's just do one more compilation to make sure that's right. Easy to count it for does feel slightly slow but acceptable gap, LED blink gap. I think it will feel less slow if we turn the, actually let's do that too. Let's undo this safe mode thing. I have a feeling it won't feel as slow with just like the two, you know, like the two red error. I think it will be, I think it's just the four where it's gonna feel a little long. I think that's the longest pattern we have. So the shorter patterns won't feel as long. Yeah, it's just that boom, boom. Yeah, maybe it still feels a smidge slow but I only cut the, I looked over and only cut the last one. I think that's fine. All right, that's where I wanna leave it. Let's push these code. I'll do it as a draft PR or I'll just do it as a, I'll just do it as a branch. Look at all that delete. I do wanna redo how it's working. And I'm curious to see how much space we save as well. Prototype, simpler flash. I am happy with that though, that's good. So if you do wanna check it out, my branch will be here in just a second. I have to get my PGP. Oh good, show my last pass vault. I think my password will actually show up. I am happy with that though. So there's a simplified status LED and I wanna make it also blink on, if there's no RGB LED, it should blink on the regular status LED as well. Cause there are some boards that have that, but not the RGB LED. David asks, should the total blinking time be constant and the blink at different speeds to accommodate one, two, three or four? I don't think it matters. I don't think, like I see what you're saying, like the total blink time is gonna change with the number of blinks at the end, but I'm more worried about like the gap how long you have to wait to see it, which I think is fine. Less is more, it must hurt to delete your work, but that was the right decision I think. It's fine, like I'm not wedded to my, I'm wedded to the overall quality of the project. I'm not wedded to any in particular thing. That code was always hairy, always kind of a pain to maintain. So I'm okay seeing it go. But I do wanna, I'll take a fresh look with fresh eyes next week and probably rework how it's done.  So it's gonna be transmitting a bunch of copies to the neopixel of the same value over and over and over again, which doesn't make any sense, right? Like how do you stop your blinker, your white, and your repel? So like the repel just has a set and then the code that calls this animation stuff is not running during the repel. So I think blinking in the repel is gonna be a separate challenge, but I think by integrating all the blink stuff back into the main nut see, probably simplify all of it, which is a good thing. I bet someone has published a paper on UX study of error blink codes and blink rates. Yeah, maybe. If you find it, let me know. It's certainly, we're not the first people to do this. All right, let me pull up my thing and I gotta go downstairs where it's cooler. Hello, you can see me again. And you can see spook in the window. All right, well, that has been another deep dive. Thank you all for hanging out when I was working on my blinks here. Even if you're a 10 plus years experience programmer, you end up writing blink code still, apparently. It's been another great deep dive. As a reminder, I'm paid by Adafruit to work on circuit Python and do all these streams and stuff. So please support them by going to adafruit.com. Reminder, we have now project bundles in the learn guide. So if you wanna just download all the files all at once, you can and it's easy, which is awesome. And thank you to the folks that made that happen. JP says stretch, yeah, I definitely will. I'm gonna go for a walk here shortly as well. If you wanna chat with me and a bunch of other awesome people, join the Adafruit Discord server by going to the URL adafru.it slash discord. And I think, I didn't say this at the start, but next week I think is also planning on being on Friday. So that should be good. And yeah, I think that's it. I'll switch cams and give Spook some pets here and then we'll call it a weekend or a week, I guess. Thanks all for hanging out and we'll see you next week. All right, goodnight everyone. Have a great weekend.


Hello, this is Professor Steven Nesheba, and I'm here to help you out with setting up a longer run in EDGCM. So the idea is that we're going to take one of the IPCC scenarios and and run it out to the year 2050. So the way you'll do that is choose one of these, which we'll talk about in class, and I've chosen scenario B2. Now if you click on that and look at the analysis of it that it kind of gives you a description of it, you may want to copy this so you can put it into your report in which case you have to unlock that and now you can do a copy on that. But in addition, what we'll need to do as usual is do this duplicate thing of that scenario and then run it. So let me just show you I've already done that. So there's my scenario B2 run up to the year 2050 and the only difference is that instead of the year 2100 here, which was the default, I had already entered in the year 2050. And then you'll press this button to let it run and and everything and I've already done that and so now I'm going to just show you what the analysis would start off to be and you know remember in this analysis, we start off in the upper left and kind of go down to the lower right. We're going to want two averages, one being I've already selected it, but you're going to want to select the first five years of the series and remember you'll press average and then extract and then we'll also do the last five years, okay, which has this handy button and that's produced this data set, which you would say average and then extract, which I've already done and and so now then these two data sets appear and I'm going to double-click on on one of these and I had already had that open so that's why that said that and so we go to panoply and we'll be able to continue our analysis from that point.