 Alright. Good evening everyone. Happy Friday. Good afternoon. Those of you who are in time zones where it's afternoon. Let me shuffle around a few more windows here. Do a quick introduction. Let me scoot this microphone just a bit. How's it going Dexter? Okay, we want this one over here. And I think we'll just put that one there. Alright. So hello to everyone. My name is Tim. I go by FOMIGuy on GitHub and Discord. This is the deep dive program, which is a weekly live stream program where we are getting down and dirty working on different things related to circuit python. Sometimes diving into the core of circuit python, that's really how this stream started. More so was started by Scott Schrockhoff, the lead developer, and it was definitely heavily focused down into the core. Scott took some time off last year and I took over doing this stream. I am not quite as in-depth as he is. We don't always stay inside the core. Sometimes we go to libraries and projects and other things. Today though, we will actually be getting into the core a bit. So we'll be going back to the roots of deep dive, so to speak. How's it going over there in YouTube? Jack Burton, Quinman16, and BeataGraph. Hello to U3 and thanks for tuning in as well as Cgrover over in the Discord there. So like I said, my name is Tim. I go by FOMIGuy on GitHub and Discord. If you are new to the program or if you're catching this in the video after the fact or whatever and you haven't watched any of these streams before and you don't necessarily know what I'm talking about, CircuitPython is what we're working on. There's the website circuitpython.org is where you can head to learn more about the project. The quick version though is that this is an implementation of Python that runs on tiny computers called microcontrollers. There's a bunch of pictures of them over here on the downloads page. All of these devices essentially have a tiny computer inside of them and we're writing Python code that runs on that tiny computer. Oftentimes it will integrate with other peripherals, other hardware that has been connected as part of the circuit either through the GPIO pins like along the side of lots of these devices or around the outside of this one. But other times it can just be built in hardware as well like this one's got a display and a rotary encoder and a bunch of cherry MX keys and stuff. So all different shapes and sizes of these microcontroller devices. They all have different stuff built in and different capabilities and things. The common thread that brings everything together is that all of these devices support CircuitPython so we're able to write this Python code, have it interpreted live on the device and executed for us. Like I said circuitpython.org, that's where you can head to learn more. It's an open source project CircuitPython is so anybody is allowed to use it. Anybody is allowed to port it to their own device to add support for it. Anybody is allowed to contribute to it. The beauty of the open source project is all of that stuff. So there's a vibrant community built around the project. If you are interested in getting involved in the community, I would say my biggest advice probably is to head over to the Discord to join us which is linked down below, ADAFRU.IT slash Discord. And with that I will also mention Adafruit which this is their website here, Adafruit.com. They are a hardware and software company based out of New York and Adafruit is the company that is primarily funding the CircuitPython project by paying the folks that work on it. So there's a team of folks who work full-time on the project that are paid by Adafruit to do so and there are other folks who work on the project part-time like myself who are being paid by Adafruit to do so. So definitely thank you to them and then if you want to help support the project one of the ways that you can do that is by heading over to Adafruit.com and purchase yourself some hardware from there. They have all sorts of nifty toys. The microcontrollers themselves, they sell a lot of them as well as design and manufacture a lot of them. They also have lots of the different things that you can hook up to your microcontroller in order to interact with. So things like buttons, lights, RGB lights, buzzers, beepers, sensors, knobs, levers, all of this sort of stuff they sell over on Adafruit.com. You can head there and get yourself some toys if that's the kind of thing you're interested in. Looking a bit more specifically at what I want to work on tonight and kind of just jumping straight in, I actually don't have the page pulled up right now. Let's do that. I am looking into, let's see here, IS, this one. No? Yes. Yeah. The gist of this is, let me pull up the camera as well. The gist of this is that on the LED glasses device, which is a specific device that runs CircuitPython this device here, this is made for the LED glasses, which is one of the things you can purchase over at Adafruit. If we click through to here, I imagine we'll be able to see it. Maybe on one of these, like there we go. So these are some RGB glasses which have two rings of neopixels as well as a big grid in the middle there. And then that first device, the actual microcontroller that, well, one of the microcontrollers that can drive these glasses is this one. This one actually happens to do it a bit differently than some of the other ones. This one has a core built-in module that allows it to interact with the driver chip that makes this glasses thing work. And this is the only device where that core module is used, at least as of right now. And it turns out that core module doesn't work quite right with CircuitPython 8. So what I am attempting to do today is try to figure out where the commit between 733 and 800 beta 1. Somewhere in there, there's going to be a commit where this stopped working, essentially, and we are trying to find that commit. And then once we find it, we'll be able to see the code that's inside of it and try to start figuring out, like, what about the code is making it not work. And then, you know, ideally hopefully start looking for a fix. So that's today's first task. In order to make that easier, I have the repo open in PyCharm. PyCharm and what I have here is a compare view. So what I have done is checked out the 73.x branch, which is a branch in the repo. This branch is, I would assume, the one that 733 is built from. I'm not entirely sure how these historical branches work, so I could have some of the details wrong, but my assumption is that 733, the released stable version that's currently the main released version of CircuitPython is built from this branch. And this one indeed does work with the glasses. Specifically, I'm running the example script. One of the example scripts that's in the repo. Let's get our device connected as well, and I will still need to get the camera pulled up. I started that, but then just jumped right back out. We don't really need the light, I guess, right, because we're turning lights on. I guess it's already focused. Oh, crashed it. What do I recommend for you and CircuitPython? I'm primarily a Windows guy, but I'm willing to use Linux. Do you mean, like, what do I recommend as far as the authoring tool, like what you modify your CircuitPython code with and run it on your device from and stuff like that, or just want to make sure I understand what you're actually talking about, or do you mean some other kind of tool that's used or something? Let's see. There we go. That focused up. So right now we have a version of this, and we can get this device out of here. That's not the one we're looking at. This is the one we're looking at, the LED glasses driver, and then the glasses themselves. And right now we're on a build that is working correctly, the OS. Let's see. What do I recommend for you and CircuitPython? I mean, I would say the OS doesn't matter too much. Personally, I use Linux, but I was a Windows user for a long time until, I don't know, about two years, two or three years ago, I think, is when I first got a Linux laptop. But I would say whatever you're comfortable with, honestly, it doesn't necessarily matter too much whether you're using Windows or Linux. The one caveat there that I will say, if you intend to develop CircuitPython, the core itself, the C project, which is what I have open here, if you intend to develop that, I believe it's a little bit easier on Linux than it is Windows. That's my own sort of anecdotal findings. Back when I did use Windows, I did start to get my toes wet, so to speak, get my toes in to start CircuitPython development. And I was able to do that on Windows. You are able to do that on Windows. There are some of the people who work on the project regularly that do use Windows, I believe. So that totally can work. However, you need either like Windows subsystem for Linux, or you need to use a virtual box or something like that. Whereas if you're on Linux, you can just build native. So I would say whatever you're comfortable with is probably my primary recommendation. If you don't feel like you're overly, you know, have a preference one way or the other, I would say try out Linux. There are a couple of things that I felt like at least were a little bit easier to get up and running in order to make the builds and stuff. That being said, Linux has a bit of a tough learning curve, so if you're not familiar with terminal and stuff like that, then it can definitely be a bit daunting. How's it going, Axl Magnus? What are we, okay, what version are we actually on here? Let's check that out. So basically we're just going to be building a bunch of different versions and running this example script until we find the one where it fails. Hopefully, where is the device? This is our example script, which is just one of the ones in the repo. And right now we're on 730-beta2. So we're not quite on 733. And I don't remember if I downloaded this or if I built it from here or what, but that's the version we're on currently. And so really what we have in this compare is we're comparing the main branch with the 73x branch. All of these commits listed in this top window here are commits that exist in main but not 733. So presumably somewhere amongst this list is the commit or commits that caused the behavior to change for this thing to not work anymore. I don't know what the easiest way to do this is. My gut instinct is kind of just to do a bit of a binary search basically. Like go to the middle of this and just like choose this one and be like we're going to test this one. So we're going to check out revision this thing. That's going to check out my local repo so that it's in the state that it was at this commit right here. I'm going to make a build and then we're going to run it, see if it works or doesn't work and then cut either the top half or the bottom half and half again and keep working our way down that way. So NRF, yeah, that's the right port. I'll do a clean. Well, this clean. Divgy says building maybe you could get a UF2 from the S3. Yeah, so the thing that, well, the thing about it and I could be wrong, but I think that the way things shook out in this case there are not actually builds in between. So and let me know if I'm wrong. If anybody has other other insight into this and I think it's something to do with maybe just when this device came out or something, I don't know, but we have 733 right here and then 800beta1 is the next one up. So as far as I can tell, there's no builds in S3 that are between these two, 733 and 800beta.1 and this one, 800beta.1, this one has the broken behavior and then this one has the working behavior. So in between those two is what we're trying to get to and as far as I could tell, none of the rest of the ones linked here were in between those two. So that's when I jumped into the actual diff in here and started doing the builds. So clean that and then we will go J8 to make it faster. Let that build. What OS do I recommend for beginners on Linux? I mean, truthfully I would say Ubuntu is probably the Linux that is the most widely used by beginners and the most widely targeted with beginner help documentation and tutorials and things like that. So that's kind of what my recommendation to a beginner would be. I know lots of folks have lots of problems with Ubuntu for various different reasons. Some of them are pretty valid reasons, but I feel like as far as an OS that is geared towards people who are kind of just getting into the world of Linux, Ubuntu is pretty easy to start up, get using. It's not super-duper different from Windows, so it kind of hopefully helps ease the learning curve a little bit. Beyond that, Debian is a pretty solid build. I've never had any issues using Debian. Ubuntu is what I'm running on this computer here. On my last computer, I used PopOS, which is an OS that's made by the company who manufactured the computer, System76. And it's actually PopOS is built on Ubuntu anyway, so it's kind of like just a customized Ubuntu. All that being said, I don't really have that much experience with different Linux versions. So I am probably not necessarily the best person to offer up advice. Can I send you a link to the OS? Let's see here. So Ubuntu is going to be this one. And then PopOS is the one that I was using before, which was alright. I was hoping, what is going on here? I was hoping that Ubuntu would be better in some ways than PopOS was in some specific ways. It did not necessarily turn out to be the case. So truthfully, I don't necessarily think one is better than the other. I think they're both fine. There's things I wish were as different with both of them. But there's lots of things I like about both of them as well. How's it going, DJ Devin? Let me catch up here as well. Did I miss one? No, okay. Oh, maybe. Let's see. Hi. Could you try various UF2s? Find a working one, failing one, then pick one between, reduce the window. Yeah, that's the goal basically. That's exactly what we're going to do. However, we just got to build. There used to be one per commit. I think there is still, I think that's the thing that still happens. It's just either this device is different or when it got released factors in. I don't know exactly what is up, but this one doesn't seem to have them. I know I've definitely seen those before. And even the most newest ones up there seem like it does have them. My guess is just like that device was too new and did not get them until more recently or something. If we go in here, well, I don't know actually. I mean these say, I don't know. This looks pretty much the same. I guess this is a relatively new device too though, right? Maybe we should be looking for something that came out a little bit further back. Let's look at the, let me hit the top of the list here. Maybe Pico, what is this one? It's been out for a year or two at this point, over a year or two. I don't know. Yeah, maybe they're gone. Maybe they don't list them anymore. I don't know. That's a good question. They do get purged out over time. Ah, okay. I didn't know that. Non-release versions get manually deleted after time or some number of releases. Okay, okay. That's good to know. All right, so we did get a build. I put that in bootloader mode, so we should be able to go cp-build here for glasses, firmware, media, let's see. Glasses, boot. So yeah, maybe if we had gotten to it sooner, then we could have found those in between commits, but for now it's the only way I know how to do this at least is using this thing. Somebody, NeuroDoc maybe, somebody pointed me to the compare page on GitHub, which is nice as well. I'm gonna have it open in this browser. I'll have to grab the link for that again. Which is a similar kind of thing as what I have here. It shows like the list of commits and then you can dive into each one. So in this case, we do have the broken behavior. So we'll close some of these down back to here. And so the broken behavior is specifically the inner part. I feel like the rings kind of seem to work pretty well. It might be interesting to go back and actually decouple this test script maybe and really do the rings by themselves and see if it's actually perfect or not, but the text, the middle part, it's all jumbled up. It's supposed to be yellow, but sometimes it's coming up as red and green and blue. Some of them are yellow, some of them have some lines where it's looking pretty much right for a few of those lines, but a lot of it is all jumbled up. It seems like communication is getting corrupted or something weird is going on in there. So this one did have the bad behavior, which means we want to work backwards from there. So I did here, which was 928-22. So I'll just kind of go by dates here. I'm gonna look back about halfway. Just choose one in here. I'm gonna try to choose the merge ones just because that should hopefully give us like full PRs. I don't necessarily want to end up on a commit that's like one commit out of 10 for a PR or something, right? Ideally, we want the actual chunks where they got merged all together, the commits, rather than just like one out of five or whatever. Good for just using apt. Let me catch up here. Here's a link to the S3. You're in the CirclePython, you should bookmark it, yeah. And then CirclePython.org links as well. Getting red pixels in the rings. Yes, but I think the red pixels that are in the rings are actually just from the text while it's scrolling. But there are, yeah, there are a few where the blue is not where the rings are not working, right? But I think that is as the text scrolls through. Maybe we should work on decoupling that real quick here. So we should be able to disable the text by just not doing anything on this display, maybe. Would CirclePython on Ubuntu PyCharm work in a virtual box software? I could not really answer that. I don't have any specific experience with it. PyCharm is the IDE that I use a lot. So I do like the PyCharm IDE and I haven't had no real particular issues with it. But I have never used it inside of a virtual box with CirclePython before. Following errors, unable to write. We didn't get our code to change for some reason, but we're into safe mode. But we should be able to save our code in safe mode, shouldn't we? Just not have it not run. Okay, I guess that was just timing. Save that, we have no show. And then to get it to run again, we'll just use the reset button. It has bisect command that automates finding where the code broke. I don't know how to use it. If you can point me towards a resource that shows me how to use it or something like that, that sounds pretty sweet, definitely sounds helpful. I do not know how to use it, though. Well, I don't know, I was thinking maybe... So we don't get read in the outer rings anymore. I was expecting kind of nothing in the middle, I think. But maybe it's leftover from before, right? Because that's one of the things about displays in CircuitPython. They live past the... PM? Let me unplug. Re-plug. Write down some of the dates of what you tested. That's a good idea. Right now we're still on that 928. I did... I think I checked out a new one, but we haven't done a build and copied it yet. We did still get this stuff in the middle, so maybe we should not initialize the display, actually. Yeah. Because when we initialize the display, it's going to try to show Blinka. I bet you this is Blinka. I bet you this here is supposed to be Blinka. It's purple as well, so... Kind of tracks? It's obviously too small to be able to make out what it actually is, for sure, but my guess is what it's supposed to be. I'm about to fill me guy. If you have questions on the IS code, nice. Maybe just have to ping me feel free to. Nice. I will definitely do that. If we get into it and I've got questions, I appreciate that, my friend. Where do we make the display here? Let's get rid of that. We should not need the frame buffer? Do we not do the frame buffer also? Brightness? We're going to put this stuff back because my hypothesis is that these animations actually work right and that it's the display stuff specifically that doesn't work, but it's still just a hypothesis, so we've got to do the test. If that turns out to be the case, though, then we will put this stuff back so that we can test and know when we have a build that fixes it. Works amazingly well. Can highly recommend. I try my... I think maybe that's what I was talking about there. Following... Ah, we had this. We get this again. Why did we get this? I'm not a bummer because I just, like, wondering how to prompt engineer this situation into chat.gpt. Copy this here. This is on my PC that way. Whether or not it saves on the microcontroller doesn't matter. Save it here and then I guess are we back into safe mode? Or... Now we are definitely back into safe mode. I'm going to try not to reset this too fast as well. For folks that watched last week's deep dive, I think that was last week. I kind of got cut off at the end because my computer crashed on me and I think the reason that my computer crashed on me was because I was resetting USB devices too much slash too fast. I'm going to kind of try to give it some deliberate slowness instead of going as fast as I can to just cross hopefully not end up in that situation again. I have this stuff here though. I don't know, that's weird. What would it be drawing? Maybe there is... maybe I'm... maybe hypothesis then is wrong that it's only the display part. See, the other thing too though, I'm not 100% convinced that this saved my new code, right? Because PyCharm gave me that error. Let's try this. Let's see if we actually have this. See, I see we're having trouble saving each time. Hmm. I don't think it's saved. I think we're not running the new code. I'm going to go... Oh, we just hard crashed? Okay. I'm going to go to REPL. I'm going to close this. Unplug. Plug back in. At least this thing does think it's saved. Of course we don't... and then it just hard crashes as soon as I control C. This build doesn't seem like the build we want to use, I guess, too much. So we're just hard-faulting here. Um... I still don't think I trust that we are actually having the latest code. PyCharm is showing me the code that's edited but I don't think it's on the device. I think PyCharm is lying to me. But I mean, did we get time.sleep? Because it didn't print, right? We should have seen this. So either it ran and this got printed before this connected. Therefore, we just didn't see it. Or... it's actually the old version. And the problem is like normally what I would do here is control C and then control D. That would re-execute the code without disconnecting, reconnecting. Which in our case would make us be able to see if we got this sleep and make us be able to see if we got this print. But as soon as I control C here, this will hardfault, I think. I just did control C once, we got disconnected and then we got hardfault. So yeah, I think we can't use this version. This version seems broken for other reasons. So I did check out a new one of these. It was 8.222. We're going to make the build. Should we make clean each time? Probably. It's new. Makes me feel like I'm watching Inception. Commits inside your commits. I mean, we could try... I don't know that I have Moo installed on this computer. Come to think of it. I don't... Well, we could... Yeah, we could try it to see if the code is there. I can just use Text Editor too for that as well. That definitely looks like Blinka. However... Why would Blinka be showing? Well, if we still have the old version of the code, I guess. Yeah, if we still have the old version. Let's see if we can reload. This thinks this is red. Okay, just a bunch of this stuff. Yeah, that was a mess. I mean, this still shows a new version. Let's just restart. I went to Hard Crash there. So the display on this one works. But it still... It did still hardfault. This time I didn't actually do anything. It just ran for a second. I don't know how long that was. And then hardfalted. We didn't print this, but I guess it could have happened before. Supposedly we have timed out sleep, so I would have thought 5 seconds would be enough. But... Maybe not? But we're still doing... Yeah, I don't know. Something is weird. Not letting us save. It's still not kind of a little bit unconvinced that we are modifying the file. It would be plenty of space free. Yeah, see, this is still the old one. This is not even the changed one. Yeah. I will say I've had this happen a few times with PyCharm. I don't know why it's doing this or how do I could fix it. This is probably, I would say, though, about what is happening? I can't get into things a little bit. Echo sleeping before sleep and then slept. We could do that. And also, this is something I like to do sometimes too. Yeah. Well, I can't do this here. It's not going to save. This is not going to do me any good. Alright, let's just close this. I was saying, though, this is probably the one downside I have found with PyCharm before. This is the second or third time ever that I have gotten into this state. So it's not a common thing at all. I do a lot of work in PyCharm with CircuitPython. So it's not common at all. But... It is kind of frustrating because basically this is a lie, right? This is not actually on the device. Even though this says FlashMediaTemC, CircuitPy, CodePy, I open this even though this is here, this is cached. PyCharm has this saved somewhere on my computer? Not on the device. At least not on the device in the CodePy file, which we confirmed by looking through a different program. These are all uncommented and we don't have that time sleep in the prints or anything else there. And it makes it tough, honestly. Was that the build we... the commit? PD38? I guess this one doesn't actually tie back to or it does, okay. B38... B38109? B38109, okay. Can't rename. I wonder if we just got corrupted drive? Read only. Yeah, I think maybe we got corrupted drive, I guess. Do we need anything that's on here? I don't think so. I suppose we should at least keep this in case. It doesn't really cost anything. Is there a way to force it not to cache? I don't know. Probably yes, but I don't know how to do it. The thing about PyCharm, unfortunately, like you can configure basically everything but because basically everything is like a lot, a lot, a lot, a lot of things, I don't know how to do all of them and I don't often feel like spending time digging through the help pages to figure it out or the settings pages to figure it out, so my guess would be yes, but the truth is I thought I already turned some stuff off to try to make it do that and feel something weird is going on with it, so... In this case though, I think it's it's twofold. It's the the real crux of the problem is that the device is actually seemingly in read only. It's not allowing us to save anything. That's like the crux of the problem. If that was fixed, I don't think we would have the rest of the problem, the rest of the problem being the fact that PyCharm is showing me that cached version from wherever it came from. If it would be able to actually save correctly though, then it it wouldn't get out of sync like that, I don't think. Validate caches, we could try that. That's in here somewhere or something, I think. We need to get our device back in order though, because I even I tried this which is totally outside PyCharm and we can't write from here either, which means nothing, anything we ever do inside PyCharm won't make a difference at this point, I don't think. Now we're back to this showing the real stuff. So let's edit it here first and then I'll copy it over. This one does not initialize the display, so my understanding is we should not get Blinka. Let's even, let's ax more of this too. Get rid of all this. If we don't have the display, then we don't need a text label. None of this is actually going to do anything if we don't have a display. What is that 3 and why is finally that's working. What is that 3? Bookmark. I have no idea there were bookmarks in this. Can I go to it? If I like, is there a key command to go to it? Might be kind of cool. Navigate with the carrot. Bookmarks. Shift F11. With a mnemonic press Shift F11 and then the letter you need. If we were in a totally different file and we said Shift F11 or that's pretty cool. I need it right now and I definitely did turn it on accidentally. Shift F11 is not the easiest thing to do on my keyboard but that's pretty sweet functionality. Didn't know the device was in read only. It's usually not possible unless you have a boot pie that sets it that way. In my case I think we probably corrupted the storage somehow and that's how we ended up in that situation. Probably as part of our resets and our hard faults somewhere in there, something happened at the wrong time. We ended up with corrupted storage in such a way that it ended up being read only. Which does, that does happen from time to time. It's relatively rare but especially if you're doing Sergipython development where you're loading new versions of Sergipython all the time and like especially like, you know, in between like nothing that I'm loading is an officially version, right? So it's like definitely subject to Lord only knows what kinds of bugs and things as well too, so we save that. No module. Okay. Yeah, yeah. Module, display text. Sergipython is outdated. Outdated by a while. December 10th. There we go. Okay. Sleeping 0123. So we have the latest version now. Changed version, printed. No, we don't have animate. Wait, this never called animate. Wait a minute. How did this work? Am I crazy? How did this work? Did we delete animate? There had to be animate in here, right? Well, I must have deleted something. There must have been another line here, I think. Honestly, we messed up this stuff too. All of that stuff is messed up. The intention was wrong and we lost one of these lines too, so that's up back. Also, we don't want this now. Okay. I'm sort of still perplexed by the Blinka. I assume that's a Blinka. Not sure why that would be showing at this point, but maybe it's because we ran the other version first, but shouldn't this release it? Did make it to control C and then, nope. As soon as I did control D, we got the hard fault. Are we going to be stuck again now? Boy, that is going to make the that's going to make the develop the testing iteration cycle here a bit slow. If it's going to be we get corrupted every time. It's executing, so it didn't go directly to hard fault, but it is still a read only. Can't change the files. We definitely don't have a boot out. I mean a boot py, so we're definitely not, like, accidentally making it read only. Definitely just getting into a broken read only, so um, yeah, it would still won't work. It'll still fail. It's like yeah, it doesn't care what my computer thinks. That's why I'm thinking of memory error that is causing the hard fault, something with allocating, freeing memory, blaming my own poor skills. Uh, I don't, I wouldn't blame your poor skills. I don't think that's not the way I look at it, at least certainly. Erase file system. I mean a memory thing does seem to make sense as far as, like, the way it's breaking I would say though, for sure. So let's write a, or well I guess this is the back to hello world. My pie charm is frozen. Wipe the pico from 7.3 to 8.0 to 0. I do remember seeing something about that. I wonder if we are getting that when we up, I've only updated twice though at this point. So now pie charm is frozen. So, try to try to talk nicely about it. Today is not not pie charms day really. It is broken in such a way where it's not going to work after we close it and reopen it either. Like we're getting further away from where we're trying to be at this point. Okay. That says circuit pie with nothing. This has stuff. I think that we are just going to give up on pie charm for this to try to eliminate another one of the things that's currently broken. At the end of the day I don't want to be troubleshooting pie charm right now. It's got a jingle like something of no longer connected. Close that all together. Okay. We lost our changes from last time. And this doesn't have a comment dot lines. Did I know how to use that? Nope. As soon as I did control D it hard faulted again. Partially I feel like what I'm learning right now is stop trying this version. This version is not going to work it seems like. But I mean we got farther than this. What changed though? I would assume at this point we're back to read only. Is that a good sign? Better at least. We are hard faulted currently. Can I just not run this code though? Stand. So this didn't print like 0, 1, 2, 3, blah blah blah. So it failed before it got there I guess. But I can't see it because it failed before it connected and as soon as I control D it's going to hard fault. No libraries that would make sense, yeah. And this just re-ran from me saving the code and didn't hard fault. So if I control C control D. Control D definitely does hard fault it. So when it first comes up the reason it fails is it doesn't have libraries. Should I have gone to REPL first? I feel like I probably should have gone to REPL first. Can I get anything this time? Okay. I think I'm throwing away this version. I refactored this to try to separate out the label from the animations to try to see if one was working and the other wasn't. It feels like it feels like we're fighting a losing battle with this though. I don't want to keep feeling like I'm further away from my goal after spending an hour on it which is not what we want. I'm going back to the stock version no longer caring about separating out animation from display because I don't know why that's not working. We got a bunch of different outcomes. None of them necessarily were ones that I was actually expecting. I was trying to get myself into a spot where I was doing what I expected and I failed to do that. Hard Fault Handler. This time we had an error because we don't have the font but we did still end up in the Hard Fault Handler nonetheless. I guess that should have failed the reason it failed last time too actually because I just didn't copy that font. Ever since we ran storage Erase File System the first time theoretically we should have never expected the font to work after that which I commented it out for a while I guess that is why that partially worked. Now we need to go between 8.2 and 9.28 Let's go around like 9.1 somewhere 9.4 Check out the uploader and while this copies I will BRB Copy that we're back to CircuitPie That's not doing anything So That's interesting 4.4 9.4 This was 9.4 We don't know if it's good or bad yet I guess So this one failed Oh I was going to say this one failed for a reason that we don't get to see but something triggered it to rerun Is that me saving inside sea lion? That would be weird wouldn't it? That's not what triggered it The reason I hit Hard Fault is it never tells you why it crashed Well A program that's crashing can't always tell you why it's crashing It doesn't necessarily know I think like all programs All programs get to a certain state of broken and then can't tell you anything about why they're broken or how they're broken because they're too broken to exist or do anything I don't have a debugger so if I keep running into it I'll switch boards Yeah A lot of boards to choose from that's basically because of Hard Faults I do like swapping between them I mean it's particularly tricky to debug for sure but it's like I don't necessarily think it could be that much better really somewhere along the lines like too much of the program doesn't work it can't tell you can't tell you exactly why the program doesn't work I mean that seems kind of odd right we have definitely a thing connected let me just unplug re-plug it was the wrong button Okay we have bad version so something between 8.22 and 9.4 so let's aim for like 8.15-ish halfway through August well yeah I feel you there it definitely does get frustrating it's frustrating sometimes for sure the thing that I tell myself in moments where it does start to get frustrating like this though is like I would rather be the one to go through this frustration than somebody who is brand new and has no idea at all what's going on or what could possibly be broken I'm better equipped to fight it even if it is a frustrating experience than somebody who's brand new so I'd rather slug it out and save someone who's like picking up circuit python for the first time from hopefully having to deal with anything similar and that usually helps get me through it even though it is difficult to end our frustrating sometimes so we'll go to B.C. this one we'll make a new build copy that feel it in the force nice fingers crossed I mean we're definitely narrowed it we got it narrowed down making good chunks out of it each time so we ended up on 8.16 that one's good we want to be between 8.16 and 9.4 so we will go maybe like 8.24 5 ish there's 8.15 snuck in here out of order that's kind of interesting let's do 8.23 here make clean make for real bootloader mode let me wait until it's done building I don't want to reset it while it's building stuff it's part of my slowdown a little bit initiative we'll go to bootloader mode that's it for just a second copy our file to it I'm guessing that's a broken one so now we're going to be between 8.16 and 8.23 so let's land on about 8.20 8.19 fix that merge pull request gambler that seems relevant IS31 do we want to go to the one before that of course I don't know I go to the one before that does it actually not have it or because small fixes to remove hard coated this is definitely touching those files seems particularly promising I suppose let's try to get one before let's try this 8.19 but specifically 8.19 before the ones touching actual IS31 that's 8.19 surely that's going to be the key I guess right it's got to be the ones that actually touch those files I've got to assume that's where it is it's me from about the IS31 that's probably where it broke the build we go to bootloader yeah that's true part of the cycle of life it comes to software at least this is good though because if this actually gets us down to the right spot it also gave us a PR number although I don't know if oh yeah yeah 6784 it did it gave us PR number as well so we can pull that up as well and see just the diff from that PR and actually look at the files I don't know sometimes it will list the files here something must have changed the view somehow okay so this one is good and so then just to verify we're going to build the one that we think is the one where it broke which is well twofold I guess it would be either I mean technically it would be that actual commit from gambler but I suppose we'd get the same thing if we checked out this one let's do this because this is like the literal next one right 819 before that one was here in 819 gamblers the one we're on this has got to be it I looked at one point I looked through all the code files that had changed and I didn't I must have done something wrong because somehow I left with a conclusion that none of those files had been touched in this range didn't make any sense to me but I didn't keep digging in that direction so I must have done something wrong when I found the actual list of files because that was the first thing I did was like look inside that module and try to find relevant changes how I seem to have failed we are honing in hopefully so 6784 I think it said and then github will be easier to tell the actual difference in the code 6784 display height got added I'm interesting that it was 5 before but I guess that's because of it only really supported the one device the environment Aidaford hasn't get having development there's no toxic blame I've seen other places just super nice and open very inviting love it, yeah I only agree there it doesn't do any good to be you know mad being toxic to people certainly so the good news is there's really not that much here so theoretically I mean like the height maybe self height what does self height actually report so this would be can we actually print it out this is not the right file right because we got out of PyCharm because it was wonky we started it we did actually make it hard to fault this time did this actually save probably not it doesn't look like it I'll try unplug, re-plug PyCharm has made the code work more on PyCharm has made the code work more on generic displays like 13 by 9 I don't think I used scaling for that display guessing the height passed as 15 when it should be 5 divide by 3 for the scaling if it is 15 instead of 5 it's probably writing who knows what to memory all over the place okay so what is actually it's probably better to even be inside the core here right like can we print it from the python layer I'm kind of curious so we made it we got back to safe mode here I know that we're going to be able to get oh and we're disconnected actually right now okay oh I unplugged it oh I'm disconnected already I think it's saved at that time but it actually did or not necessarily no seems like we made it to there at least we didn't see our print but that's because we weren't connected yet so then the other thing actually that we need to do is I want to print the height somewhere here this is the wrong code it does have this actually is this the right thing to print the height from before we do this yeah looks like it should be or do we want the frame buffer we want the frame buffer display or the frame buffer just frame buffer does this have a does this have a width I mean a height I mean if it has one it probably has both but I'm just not defined I think that was just errant right from my computer reset again buffer height is 15 display height is 15 so then what we'll do is go control see this hard faults us unfortunately that's fine for right now we want to go back to the one before and then run the same code and see if it prints 15 for both of them still here if it doesn't then we know that is the difference passing in 15 but the I mean should it not be passing 15 I guess I don't necessarily know what it should or shouldn't be doing but it does when you pass 15 it works on 7.333 version right so it should I mean passing in 15 here should should be fine I think should it or not maybe I don't know well I definitely don't know but it does work on 7.333 but maybe that's just getting ignored on 7.333 or must be some other reason buffer C line so I'll look in there I will be in a weird state like right now I'm on the state from right before your commits I believe is that in shared module in 75 and so the lines will be different here because this is before yours but I think height was that I think it was passing height in here maybe in the new one we got our build let's go to bootloader copy this it was hard coded I see so and then it's just ignoring I guess so then is our change maybe maybe two-fold question is our change actually in the core or do we just need to change the example to be 5 instead of 15 but then the follow up from that is like if we just need to change the example to be 5 instead of 15 next questions becomes could we guard against that in the core to where if you give it the wrong number somehow it doesn't do the weird stuff this does have 15 both you're still though so it's like it at least thinks it's the same number which is interesting oh we are now at the top of this list thank you to whoever said write the dates was I think that was David whoever said write the dates earlier you saved us just now because if I hadn't been writing these down I don't think I would have remembered 819 then we would have just been like scrolling through this list again or searching or something did it again actually for some reason f134f8 yeah yeah yeah okay so then let's look at the file this time that's got self-height switching to twitch so I have less leg hearing what you're doing what if I can't divide by 3 evenly like 11 good question but in the low level code it should be 5 because the physical display is 5 it would be self.scaleHeight if self.scale is true so like here basically instead of self.height it would be self.scaleHeight but then technically only if scaleHeight if scale is true does this have a scale hey whoa whoa whoa so then we can I'll worry about the if statement after but theoretically we then maybe fix it with like that like hard coded for this version to test it but then we'll need it sounds like we will need probably if statement or something here so if scale is true then we use this otherwise what do we use otherwise do we just use height if it's not true got blocked what I changed but I'm assuming you said it I did yeah here let me do I said it to I didn't really help very much did I I said it to self.scaleHeight sorry I got to try to remember the chats there forget about that sometimes scaleHeight and then okay height otherwise so so theoretically once we can have an if statement we'll say like if scale is true then we use scale height if not then we use regular height okay I think did I make did I make the second guessing or just gonna make a new one doesn't it took 10 seconds or whatever to build 20 seconds we'll just spend the 20 seconds again just in case double tap bootloader copy I should have had it print scale height too oh well we have time to sleep which we missed the beginning of because it wasn't connected yet that's fine buffer height 15 display height there it is so now we're gonna go all the way back to main try making that change on main just to make sure that it still works with current versions and then at this point we're ready to make a change make a branch make a PR so let's go back to main technically this will still have my change I think is pie charm while we're in sea lion now which is not pie charm but might as well be as a bunch of helpful get stuff which will automatically stash and unstash scale height should we try our let's not do the if statement yet let's just do it this way hard coded still again so we'll just make a build this build is main current main but with the change of this being scale height and then I gotta run to the restroom again sorry so I'll be our B also shows up on line 196 it's about 30 or not 30 or oh there's already an if scale so then should one should it just be should it just be so if scale in here is true so should that one be scale height but then 196 because that's an else a scale false should that one still just be height because that one should always be scale false if I understand the logic background scale is from the Arduino version where it would create a 3x size display in memory the average squares to make it look nicer on the tiny display and and average squares to make it look nice on the tiny display interesting scale height should always work I see okay many code windows open I feel you there I can definitely relate to that conundrum scale to make a new build here clean we probably don't need to be doing clean each time but that's alright so we're doing a text always looks so blocky when scaled up just good question I mean if you mean like on displays and like if you're talking about specifically on the glasses and or the matrix then possibly if I'm understanding right though everything gambler is talking about with the 3x size in the Arduino is specifically to this is 31 NeoPixel chip and either the glasses or the matrix so if you mean like on a separate display or something with Arduino then I would assume that's a different deal also not sure that I understand though what which one you mean so we're gonna go reboot bootloader hug report by the way for mark probably would not be able to figure this out without you so thank you for tuning in and thank you for bringing your historical knowledge to the table because I think you have probably hit the nail on the head here and I don't necessarily think it would have been that easy for me to figure this out without your help I probably would have just been trying to undo each of those changes one at a time to figure out what was going on I did not know anything about the scaling like this 6 could both be this one really wouldn't matter on the 196 one would I copy no oh because we made two builds so that's the same thing we had worked out that I was on and saw that you were working nice yeah probably we won't make it to the other display stuff but the next thing if anybody is interested in a sneak preview of what I will probably be working on tomorrow now it is a display io issue I'm like a moth to flame for display io stuff Jose David posted issue if you use negatives when you instantiate bitmap you get memory error it should validate for positive values so tomorrow we will as long as nobody else has come and done this change yet tomorrow I'll work on that argument validation I figure we'll start in bitmap my assumption is we'll if we actually took a closer look around we probably will find more places where negative and or non numerical values would cause weirdness to say the least so we'll start with that one and then kind of look around through the rest of display io as well that is really really weird this was running ever since it rebooted just fine like literally until I came back to this tab I clicked back to this tab and it paused as soon as I got there which is so weird this has like it can't be writing files like that was just a coincidence but like wow and why that was so weird okay and we are good still so we have now current main with the fix everything is going good so then that fixes what we would want to PR looking forward to next Christmas stream from gambler in below freezing weather looking at neo of pretty neopixel projects reading the display core to figure out how gifts how to get gifts going so needed distraction ah nice yeah gifts are going to be amazing you get another hard report for working on that I think that's going to be super awesome once you get a branch or a PR or anything in I will definitely definitely jump on train that out um okay so let's make a branch so that we can have a PR um is there do I need to somehow is there a way I can like test the other case or something maybe we should make a new example that uses the native driver but does something less complex it's kind of a separate deal though right five second number forms part of an adjective compound use a hyphen check out dash B IS 31 FL 3741 I've gotten this memorized now I've done this enough times I have to go in chunks of two though I only have it memorized two digits at a time out dash B fix we say native I mean it doesn't matter native right because we're inside the core which means we're only working on the native one anyway uh from data fruit main no track new branch theoretically we should be much ready to push I don't know why we have two more changes I'm gonna uncheck those so we should have just 175 and 196 which now have scale height instead of height should we run precommit yes the answer that's interesting okay I'm gonna check that in either though weird I don't know why it made that change that's odd 80 degrees Fahrenheit you got it them diffs we're gonna cut that copy guy haven't used this define remote thing very much but it is actually pretty convenient being able to do that from here just like I did usually I do that in the terminal but month or two ago I forgot to do it in terminal once and found that thing in that menu learned how to actually do it from there negative 30 C this week thankfully it's on its way out I think just turn scaling off and making the display 15 by 5 yeah today was fairly cold here I would say I don't actually know the temperature for sure my guess is like probably 40s something like that 40s Fahrenheit and I hear it's supposed to warm up over the next couple of days which does sound nice it's not like frozen here though but it was on the chilly side let's say not too bad but wouldn't want to spend too much time out there out of code or anything don't get to I don't know how does it decide which which ones to put in that list 7516 yeah with you for its weather yeah I I'm definitely a shorts I have shorts on right now I had pants on when I went outside earlier today to go for a walk but like I pretty much default to shorts the vast majority of the year and then like if I'm about to go outside and it's super cold out then I'll change to pants before I leave but we did fail actions right away or maybe this icon is just wrong because these are both yellow here yeah still yellow get applied to us for a second that's alright it's like sub zero's layer or something oh no it's uh is it from Terminator 2? is that the liquid robot from Terminator 2? when he gets frozen from like right at the end there they freeze him with freeze him with liquid nitrogen or something so they can break him I guess that's not quite at the end day after tomorrow oh okay different movie totally different movie okay this is back to X again but is it actually or is it just GitHub all accidentally refresh the chat I don't know why we'll just have to wait for a while I don't know why the icons changing there but we'll see if it ends up not passing then I'll check back in on this later tonight if it ends up not passing then I'll try to figure out what it needs get it going I'm gonna prove the PR after everything's passed that'd be awesome okay thing else tonight I don't necessarily think I'm gonna dive into anything else we got only about 10 to 15 minutes really until I would wrap up anyway I don't think I want to dive into a different topic I had I think I put in the title the display I01 as well but I think I'm just gonna keep that for tomorrow I'm gonna keep that for tomorrow if the links are interested I'll be back tomorrow morning at 10am central time I'll be streaming over on my own channel so if you're interested in watching that you can follow me on Twitch turn on notifications and then you'll get you should get notifications for that double check your settings and all that kind of stuff because I know Twitch is like you could follow people but then have your settings off and then you don't get the notifications anyway so if you're interested in that head over there I'll also drop the links in the chat when I get going in the morning as well so the other thing you could do is just come back to this live broadcast chat the discord chat channel that's on the screen there and I'll put the links to YouTube and Twitch when I'm about to get started so I think tomorrow we'll work on this like I was saying before the primary thing to fix here is that the bitmap constructor allows you to pass in a negative number and then tries to allocate memory weirdly in a way that fails and like really it should have validation okay that's below zero which is nonsensical you're not allowed to do that so we'll add that check in but I suspect there's going to be more places where there's similar things like this right like what happens if you do a negative here or what happens if you do a negative for tile grid instead of bitmap or for pallet instead of either or for display or whatever so I think what we'll do is tomorrow's stream I will fix this one and then we will kind of go around trying to break the rest of the stuff we'll be sticking negatives and nuns and strings and all kinds of stuff into arguments that are not supposed to be see what else breaks and then try to just improve the validation inside the core generally speaking the display IOCOR yep look forward to coffee with Tim on Saturday morning if I wake up in time I will be here I will have some coffee come and join me if you're interested yeah for sure no thank you like I said again thank you to Mark I would not have probably been able to fix that without help so definitely appreciate it thanks for tuning in watching along interacting in the chat and definitely most of all thanks for helping out with that kind of stuff Mark what is my channel link I'll get you that we've got a couple minutes anyway yeah so I'll say too there are still a few minutes if anyone's got questions comments you know I just want to ask or say anything like now it's definitely a good time to do that phone guy underscore twitch I'll link that in here just a link to that one great dive and as a fan this got way further and had me intrigued lots of ideas and variables capital GG nice yeah appreciate it Jack thanks for tuning in I'm glad that it was an enjoyable thing to watch and interesting and all that kind of stuff thank you to everybody who's watching in fact thank you to everyone who came and interacted in the chat said hi and all that kind of stuff plus everyone who's just watching along appreciate all of you I do hope everyone has a good evening good rest of your weekend if you don't see me tomorrow and all that kind of stuff appreciate the follow over there I heard the jingle I don't actually have my twitch open anywhere so I'm not going to be able to see unless I get OBS quick enough which I don't think I got it OBS quick enough to be able to see it but I heard the jingle thanks for the follow over there on twitch I'm going to assume that was either Jack or Quinman one of the folks that asked for it in youtube appreciate the follow for that and for everybody else good night and I will see you all next time thanks