 All right good afternoon and happy Friday to everyone. Let's see here. I got sound going to the OBS. We got green on the bitrate. I did fire up the YouTube. They're going there so let me just shuffle around. I can see these chats and I think you are ready to go. How's it going DJ Devin? We are. All right so good afternoon, good evening, good day, happy Friday to everyone. Thank you for watching. This is the deep dive program. My name is Tim. I go by FOMIGuy on GitHub Discord. This is a weekly live stream program where we are working on things related to Circuit Python. If you don't know anything about Circuit Python, I would encourage you to start at the base website here for the project circuitpython.org. Basically this is an implementation of Python that runs on tiny computers called microcontrollers such as this device here in the middle. The screen is actually a separate device in this case, but this one in the middle is a microcontroller. It's running Circuit Python and what that allows it to do is connect up to our PC as though it were a thumb drive. We can then edit a Python code file on that thumb drive and save it and the microcontroller will read our Python code from that file and execute it on the microcontroller. These things come in all different shapes and sizes. If we click over here to the downloads page you'll see a list of all of the 388 devices that currently support Circuit Python. They come in all shapes and sizes and various different levels of built-in hardware and things from the bare minimum cheapest possible device with just IO pins and basically nothing else. All the way up to things like the macro pad which is a more purpose-built device with 12 cherry keycaps and a screen and a knob and several other things. Some of them are very tiny like the size of a postage stamp or so. This doesn't have anything for comparison so I guess it's tough to say but this device happens to be pretty small. But that's the gist of it is all these devices can run Circuit Python which means we can write our Python code for them and have them interpret and execute that code for us. So that is kind of the core idea of the project, the main thing that we're messing with. If you're interested in learning more again CircuitPython.org that's a good place to go. Also if you can join us over on the Discord which is linked down below me on the screen there, which is also the chat that is directly below me is the Adafruit Discord and we are currently in the live broadcast chat but there are Circuit Python dev and help with Circuit Python channels where you can discuss or learn about or just hang out and talk about all things Circuit Python. How's it going Biata? Got snow this year being done we're back and forth between freezing and springing. Yikes, no snow for me. It was a tad colder today than it had been probably for about the last week but knock on wood at least no snow around me. Hopefully you snap back to springing sooner rather than later and it will melt off whatever you did end up getting. Let's head back to the browser for just another minute or two. So yeah CircuitPython.org, the Discord, those are the two places to go if you want to get in touch or learn more about the project or get involved. Circuit Python is an open source project. Anybody is allowed to use it on your own devices. Anybody is allowed to port it to their own devices so if you are a hardware manufacturer you are allowed to port Circuit Python to your device for free. The company that sponsors Circuit Python, the company that pays all the developers who work on the project is this company, Adafruit. This is their website Adafruit.com. They're a hardware and software company based out of New York and they pay the team of folks who work on the project full time. There's also some folks like me who work on the project part time and are paid to do so by Adafruit. So a huge thank you of course to them and then if you want to help support the project one of the ways you can do that is just by purchasing hardware from Adafruit. They manufacture and sell many different microcontroller devices, much like the ones we saw in the downloads page back there. Here's one of those. They also manufacture and sell other breakout devices with all sorts of other things. Sensors, buttons, lights, speakers, buzzers, beepers, knobs, levers, you name it. You name it. They have a breakout for it. You can connect it up to your microcontroller and interact with it from Python code. So head over there, get yourself some goodies and help out the project in the process and thank you to those of you that do. Let me shuffle a few more actually around here. Let's put this one on top. Let's turn the preview off on that one. It hailed a couple of days ago in Florida. I will say we did actually, I did actually get some hail as well a few days ago. It was probably three or four days ago I want to say. We got some hail in the middle of the day. I did not get a chance to see how big it was but it sounded pretty big. By the time that I got out there and looked it had like already melted though so it must not have been huge but it was also like kind of warm honestly especially for hailing. Where I am jumping in today is some issues that I saw pop up in the core that are around display IO and related things like this one is vector IO which is not technically inside display IO but kind of goes along with it. So there's this one. There's a couple other issues as well that I will take a look into if we finish up the first one terminal IO thing and ITC display thing and then this one which is vector IO. So the first thing to do on this one is basically this is just saying Dan filed the issue saying there's a warning when you do a build that says we're taking the value, we're taking the absolute value of an unsigned type. So it's unsigned i.e. can't be positive or negative i.e. taking the absolute value of it doesn't really make any sense. That is what the compiler is trying to tell us. It's not a showstopper it still continues and finishes the compile but it's unnecessary and the compiler is trying to tell us that. So the fix for that is actually I think pretty straightforward we're just going to take off the absolute value on here make sure that nothing breaks and then I think that's all we would need to do. There is some more discussion on this one which I will be honest is a bit over my head so they go on to talk about some of the x y math which occurs a little bit below the code where it's dealing with the radius and so I have read through this but I did not quite follow. I'm going to give it another read through here. So this is what we're going to do for sure x and y should have absolute it says circles placed by their center point math only needs to be concerned with the first quadrant the other three are symmetrically mirrored you could factor out absolute value by doing signed math up to the end but I think you might have to store one more variable if you did so don't understand the point of int x times x and it does not recover the sign what is the purpose of the casting so that circles at 256 that circles at x less than 256 or no no greater than 256 and greater than 256 y can still be handled do I have displays bigger than that I have the new e-paper display which is bigger than that but that's the hack tablet is bigger than that a couple I guess yeah I suppose we have like the big featherling in thing as well so multiply that what do you get this is about how many bits it takes to store the int will we do you int so this is about where I'm lost on this truthfully it's portnarily every positive position of int 16 x and y ideally we would widen to you int 32 instead and it would give you much bigger range pixel don't quite follow the phantom pixel and you're supposed to maybe helpful which is always 32 bit so I prefer explicit and bit with matters always forget the rules for implicit widening yeah so I don't even I don't even know the rules for implicit widening so I cannot forget those but I do not know them I'm assuming this is basically how it treats like when you do math across numbers with different bit widths but I don't know what the actual rules are NC or anything else truthfully whether I'm on 816 so the machine so it helps read it we helpful to others reading it as well otherwise implicitly dependent on the size of int or pointer again I'm not sure I notice that below even after absolute value we're using int 16 t on arm gcc that results in LDR sh I don't know what that is truthfully LDR sh we do let's see while if we absolute valued to unsigned in we would do LDR h with no s I assume that is I guess signed versus unsigned math which is simpler zero extending widening I don't know whether the performance is better between a storing two new int 16 values on the stack or be or instances of LDR sh instead of LDR h not check pixel fill rate on the circle to compare the two options it should feel like spicy I'd be happy to test that but honestly I have no idea what they're like I can follow kind of what they're talking about but I don't know what the change in the code would be I think the tft feather wing is bigger than that yeah okay yeah three went five inch 480 by 320 so we could try on that one we could try on that one I don't know what these units are seems like these are a unit yeah I'd be happy to try that whatever it is but I would have to get more specific direction about how to make the change that they're referring to there I'm guessing it's like something to do with changing this I suppose to not have these castings but instead utilize one or the other of these options I don't know I don't necessarily see mechanically how like inside the code how that would happen so this one is at 26 inside shared module for the circle so I am just on main here I did update before I started today so that was good we don't have to wait on that let's make a new branch because ultimately we're gonna try to aim for having a PR I don't know if I need to be in the root or not but I'm gonna go to the root of the project get check out dash B let's say vector IO unsigned warning vector IO unsigned morning from Adafruit main it's our remote called Adafruit I hope so for a way I can see yeah okay Adafruit main no track how's going see Grover 2.4 inch is 320 by 240 not sure which one you have I think I actually have one of each 0.4 and the 3.5 not 100 positive though maybe something slightly different um okay run our new branch this should oh no we're not Adafruit main is not a commit Adafruit now we're actually on our new branch and it changed down here although I guess you all can't see that very well um shared module vector IO this is in circle 26 so it's much hereish radius so that's going absolute value of the radius which came from self which was on I guess vector circle T she gets back to circle H inside here there it is unsigned this one would just get no absolute value and then I'll leave this alone but yeah if I can't get more specific direction on what the proposed other changes that they're talking about are I'd be happy to try them out um we just need to make a build like this I'll make a build for the I mean do we want to go right into that I think I'm gonna I'm actually I'm gonna make a build for the other TFT slightly different one this is an ITC display I think which the other issue that's in there is for ITC displays one of the other issues um so let me dig into that but for now I'm actually gonna start with this one which is a oh camera died huh sorry actually use this one for right now which is a feather TFT just because it has a built-in display and so the code to test anything with vector IO will be a lot less ports expressive I don't need that so how's it going axle-magnus VCO wizard is here VCO zero or VCO zero I can't actually tell uh expressive this will be where we go we need to do export dot space dot slash export now we can make a build I think make what do we have actually should do a clean I guess and I guess we should probably do like oh boy I probably should have made a build before we made the change let's put that back and try to make a build and then I guess I don't know if we need v1 or v2 basically though we want to try to find the output that way we can actually confirm it doesn't do it after we make the change so let's start with v1 and then I think we just have to like have to like find it in here these go by directories I guess that would be pi and then shared bindings probably before shared module XT mod supervisor shared bindings there's some shared bindings has gone Todd but thanks for making this way better I would we're trying to for sure yeah I'm always happy to I'm like a bit like a moth to light a little bit I can't I can't uh can't shy away from a good display IO tweak hookfix or little improvement here and there whoa that's pretty sweet I've never seen that you all of that before uh DJ Devon 3 updated itsy bitsy breadboard adapters on odors so I could send you one after the after it passes the test you know what else is in speaking of uh improving display IO what we will say some props and hug reports for this week is another one which I saw maybe we'll test this out or is it it looks like it's maybe merged now aren't there uh it is gif is what I'm thinking palette support for gif gif I swear I just saw this go by that change oh not new issue why is that oh I'm on issues somehow that's what we just did okay this one uh so Mark has been working on on this gif and has added use palette for being able to do a gif with a palette instead of a color converter which seems pretty sweet uh I think this has finished so let's see if we can find our error in here this is basically saying um an absolute value of unsigned search this absolute get that goes dot dot so it says the thing have shared module slash we do have the cc but I'm sorry I guess let's try the v2 this one prints a lot more stuff though honestly this might this might actually print too much stuff to be able to see it all this is already scrolling off the top I think so we could um send it to a file instead get it talked about for all the dvi and centio progress yeah for sure I just uh put the alert I just signed up for the alert for the feather HDMI I missed them the first time around I don't know when the new batch will be but I'm excited to get that and start playing with it as well these ones are something different that's inside expressive I am used to seeing those problem is we just have these massive walls of flags oh would have assumed it would be around there somewhere did we make a build that's not expressive maybe the maybe the different GCC treats it differently because yeah I don't see any errors in there about okay let's try a different port um I have a pipe portal titano here I'm not actually sure which V we would need what do I need like dash dash warn or something this is not the right string right there honestly I think we might have freaked it out with the volume of stuff guys that actually see all of the oh I was sure how to get the error violation generates this mild warning is there a different flag you need to pass in order to show warnings never thought that circuit python would advance to this level without a FUGA or some such hardware yeah for sure and my stuff here feels like to be getting something special inhibit make all warnings into errors that's not really what I want to do though I want to show the warnings quest or suppress warnings inhibit the view all all and down the following warning flags I've seen the error don't remember on which build but I didn't give any special flags to get it okay um I will try I guess raspberry hi rp2040 is the only other when I have super handy for trying it as far as I know expressive port uses its own gcc and then as far as I know all the other ports that aren't actual big raspberry pi I use the same one maybe it's not a it's not a matter of which gcc you have something different inside there broadcom port is the big raspberry pi okay expressance has its own li-tex has its own expressive is is I don't really don't have it I think once the imx feature gets sorted it's gonna open up new pathways but it's just knives and it's got I don't know if it stands around right now or not but I'll ask in the uh breath on dev over here maybe I'll have an idea on that I'll try a raspberry pi pico rp2040 build I don't know if that will be any I would assume it's no different but let's try it so that one's gonna be raspberry gonna make a uh so I guess for this one we will just make a feather rp2040 that feels like it's must be a new thing that I don't have yet probably I need to go make fetch sub modules remove first remove sub modules before fetch they get is it like reset again or you have to remove them if you have the old ones I know there was a change recently where like if you had before the change then you would need to do that for after the change I think I have done that in this repo though we'll see if it fails on me I'm not I'm also not a hundred percent sure of the nature of it but my understanding is I think it was like you do have to clear when you go from old way to new way but once you get to new way then you don't need to anymore I could be wrong about either that or even about me being on the new way already so I'll see yeah I'm stuff around this one before the stream started I forgot something to raspberry I don't know like we don't get warnings on any of these I guess maybe there are not very many other warnings it's weird in the expressive build we saw the warnings like at the very end but they were just for some things inside the espidf don't seem to like really ever see warnings for anything inside of like shared bindings or shared modules of our code I guess so it's like a python core yeah just ask them right there all right well ideally we would see the error and then make the change and see that it no longer has the error seems like we're not really able to see that warning though so far so I think we're gonna just make the change and then we'll test it on the device and try to make sure it's not broken we can't really necessarily see that the warning went away because we didn't we weren't seeing the warning on my side I'll go back to I think the other tft though so I'll go and get a see me and get hope apparently is a dangerous conversation combination one mistake you can easily leak data moving get hub yeah moving history definitely is a whole rather whole this make to not found that's fair whoop this is the actual build with the change while that's running let's also grab some vector IO this should be a more fully featured code snippet maybe be nice if this had everything you need not quite complete this is I2C this is a temperature sensor I don't need this we really only need to test circles so I'm just gonna grab up to here a bunch of different stuff though like gonna call this main group instead of group actually change it for the rest of them but that's okay like board we're gonna need what else anything else maybe not I don't know let's see the display group palette that is let's do something more green for IO we can import install it though I have radius let's go like 30 30 screen's not too big so we don't want it to be too far out there main group append the circle then go display that show the main group or we could use the new one I guess if we wanted to root group they get used to doing it this way equals main group and we'll need wow we have a build let's get to bootloader other it's got it's on the psylabs build shared module rio and function psylabs build not done a psylabs build yet is that a separate port or it psylabs okay I've not done anything inside there yet is there a like read me or whatever for does it need its own setup yep and also mentioned psylabs um okay so I did make a build I did copy it to the device it did run we do have a green circle so far all appears good um I will try a build in here you have to do anything special default jre gcc arm I think we downloaded separately not installed with apt you not have to cd to ports yeah to cd to ports display root group is the replacement for display dot show right yes that is correct display dot root group um I'll say the setting of display dot root group is the replacement for display dot show you can also do a getting of display dot root group which is different from display dot show I can need to get lfs I think the rest works normally need to get get lfs with issue only over 256 uh no the over 256 was was uh more of the x y he was saying why the casting was done on the x y was something to do with over 256 is my understanding so I did fail it print out a lot of stuff it's lfs is that one that was in this list of pseudo apt what is that get large format file support I need to do fetch some modules again do you remember that as well like it supposedly get a newer git which would let me do something different inside there probably do anything new this time um is it big enough on this one yeah no this one does not have 256 pixels in either direction I don't think um should you know what's on my head how wide is that feather tft the 240 yeah 240 by 135 so not quite enough to do 256 there is that right though I think that was not about the that that we were doing anyway though which is why the 256 was the casting and one of those other alternative ways that that could work other than the casting they're quite grok still syntax error dude I think that's where it failed before too hard part of maybe we should let me try without v1 hard part is like there's so much here like how do you do again trying to figure out which part is the error without the get lfs one of the clones during the fetch some modules that don't work okay maybe I'll yeah I may need to redo because I did try fetch some modules again but it didn't seem like it grabbed anything new possible I need to do the remove yeah I did see a warning up there I think oh but oh no yeah but we just we oh but I'm on the changed one okay so we're at least getting past this actually even if I fail the build that's fine because I don't I don't actually have I don't know even really know what these devices are for truthfully and I do not have one to load so I definitely can't try it on real hardware but we did make it through the vector IO build unfortunately we printed out so much stuff that we can't see it let's do make clean again let's do make again but let's go can't you do it like this one put a file or no or do you need cat how do you send it to a file okay I was right just the arrow and then we don't actually get to see it in there I could open it it will open here but it's not gonna refresh live I don't think I could like tail it I guess and it would refresh live but I think what we'll do is just give it a second to run and then should crash the same way again should be able to look in here oh some outputs even came out interesting maybe we will see it here I assume that would put it into here oh yeah there we go that's actually the one we're looking for and we did not see that when we had the code changed I wonder if there's a way to do a newer compiler on a different port did I just try a newer GCC on expressive or at mill and then maybe get additional warnings just rewrite the file or add to the end of it oh we will still see a few of the other ones but not the vector IO one the long way around to get rid of a warning but I have learned more about different compilers in the new port be my first time attempting to build the new port although it is like brand new and I don't have successful builds yet so I'll have to figure out my sub modules it'll be the first thing I try okay yep no vector IO we're already on our other branch we're just gonna go back back pre-commit run fix the file I touched that file I feel like I touched that file intentionally okay yeah I was playing with displays I don't know why those changes are here play limit to web workflow zero I was trying to make a uh debug build for debugging multi displays for why it kept those changes though so yeah let's run again okay that is green and then we should now only have changes in this file uh get remote dash v you have foamy guy so we're gonna go commit and push go to foamy guy I have on signed warning our commit is here it only touched one file this is seven eight eight three I'm so bad at spelling I don't know one c two s's one c two s's okay next one up is I think we're gonna do terminal IO next because also I just have never really played with terminal IO so this seems like a good excuse to do that this is saying terminal IO it fails when you try to just write some stuff to it after you create it init data left a version that works but it creates tile grid no this creates tile grid also we're gonna try that we're gonna see it fail god says terminal should verify that the tile grid has more than one by one and raise an exception if not I'm guessing it is probably meaning inside of here maybe in the init of this let's try this though I don't have a external display so we don't need all of this code but I'll take take it to start with um vector IO circle we want to keep that I guess this code put it here get rid of all of our display stuff display support the display they do it did give t dot show background if it's gonna crash before this then I suppose this doesn't matter but if we if it didn't crash I don't think we'd be able to see the output if we did not do this so let's do that in case it doesn't crash theoretically it will crash yeah same thing with what they said so 17 is actually on the right function not the instantiation does it matter if you only do one character no still fails okay I'll indexes out of bounds so anacdata says worked when I did it this way we get the bounding box of the font that you're using and create the tile grid with some more things but instead of this have this we also need to get this um before we do all of that though can we just give it two by two and see what it does because I don't see it's not going to be able to write three characters into two by two anyway is it so if we go x y instead of display width over font x let's just say let's just say two two and then tile width I guess we would need to get from there probably let's do palette we'll put the other palette that we already had although maybe we need two maybe we should use the palette with two colors this is no longer called spray instead it's log box okay didn't crash but it doesn't seem to show anything either but it does not append the log box to the background so not necessarily be anything that's in rebel there we go okay I have a pink rectangle and a very very very very tiny a probably we will not be able to get thanks from guy dinner bell have to catch the rest offline uh yeah take it easy retired wizard thanks for hanging out for a bit I hope you enjoy the year dinner um so we have a pink rectangle and a very very tiny letter letter a which makes sense because the default font is very small the pink I don't know about I'm a little surprised by the pink since we chose colors white and black here but I guess there must be pink I mean oh I see I see I see I see we just around one of those that makes more sense okay now we have black background with white very very very tiny a and we only wrote one letter but if we write two letters we would be able to see them both and if we write three letters it will wrap to the next line cool okay this is super basic but I have never actually used terminal IO to do this before I've always known terminal IO like when you're in rebel or serial console it's showing you output but I have never actually used it from code like this so the crux of it is essentially you just can't this can't be one by one it can't be one by one if these are the default what are these default two hero first title grid none width and height default to one tile width and tile height default to none defaults to the full bitmap how's it going password 16 they're on youtube that one crashed oh and crashed for the same reason though i'll index out of bounds width of a single tile in pixels defaults to the full bitmap and must evenly divide into the bitmaps dimensions those int none but then when you actually explicitly pass none crashes fascinating let's take a peek on this side I'm pretty sure this is the default and I think that means it's zero how's the code going I would say pretty good pretty good overall good day of coding today how about you you got any code going on over there zero well does it fail with the same yet the same error as when we don't pass it so yeah technically I guess this shouldn't say none right um maybe it's zero right let's try to prove that further so if you don't pass them and then you say print logbox tile width cw just learning python today nice I'm certainly a big fan of python hope you're having a fun time learning it 570 not zero and I guess it's the width of this bitmap then I suppose is what it ultimately works itself out to being in our case that bitmap is just internal in the system somewhere but if I set it to zero explicitly does it also go to 570 yes okay I mean I don't know I suppose it's splitting hairs I feel like I feel like most correct would be that these would actually say zero and that in here it would specify that the default value of zero will cause it to have this behavior hopefully worded in a more succinct way than that I'll leave it for now though because it does seem not necessarily related to specifically what we were sat down to do so yeah yeah I mean you go zero zero and that's fine but didn't we try one can we try this and we try this and it succeeded w6 it succeeded and did print a character printed the last character I guess right yeah it's the c because I guess everything else scrolled off it printed the a then it printed the b then it printed the c and they each scrolled off all this happened so fast that we probably didn't see it so this can succeed with one by one but in order for it to succeed with one by one you have to set the tile width and the tile height also I will say though one by one like it doesn't make such a great terminal so throwing an exception in that case does seem pretty fair also because like one by one doesn't you can't even really see anything I mean honestly even like I would argue like even up to like maybe four by four is like still kind of too small to actually mean anything I'm not sure if I'm using this correctly found no examples that's the other thing that could come from this actually would be uh example code for terminal IO that would be nice to have um I'll be back in one second Scott says terminal should verify that the tile grid is more than one by one and raise an exception if it is not so technically if I'm understanding what Scott says correctly that's meaning that he believes this should raise the exception it can actually run today but it is kind of nonsensical since it can only print one thing and then if you don't include these that is when you get the error that it does actually report with the defaults which is that it tries to say tile index is out of bounds I wish we could see the rest of the stack trace so I think it would make the most sense to do this inside of the uh constructor I don't actually have terminal IO in this scopes edited my scope but then took me off of it I'm more in here it'd be nice to have a full example so right now there's not a whole lot of validation going on in here so our tile grid is where our tile grid got passed as the first argument right doesn't make new scroll area there we go okay scroll area area of this this is validating type to make sure that it's a tile grid okay validate type on the status bar only if the status bar exists once IO built-in font validate the type of it do terminal object here and that's calling into construct so here I think is where we should be checking the size of it and I think we could be using the mpr validate minimum range or something I always forget where these are at real click I don't know if I could find some like sea lion guru that knows more about this IDE in the context of sea projects that could help me set it up to where control clicks would work that'd be super convenient it's inside pie arg check p arg oh so there's all day int all day int min which is what we would yeah that's what we want because we don't the maximum range that would be enforced by tile grid and it should already it should either already be enforced by tile grid or if it's not it should still it it should be enforced inside a tile grid not terminal whatever the maximum size is that should be an issue in tile grid not terminal in terminal though the minimum size is supposed to be one so we would want to go that's going to return the int I suppose the thing is we don't really need I after we're done we really just want to do the check and then we don't really need our variable and we call it without um we call it without catching the variable can I just say mpr validate mint uh int min that would be I and then minimum so I is uh that's going to be on the tile grid which is scroll area dot no is it going to be an arrow though I do this thing right you know what before we start calling this kind of stuff why don't we just do a print how do you do mp print print f ampersand mp mp plat print the arrow tile let's see if that even gets printed you that go to the other one of these or I guess they changed I don't know we're not we don't have the expressive one any ports expressive do we need to export again probably oh no no no export dot shell ls uh make board that without so we got the bash make forward feather we have edited that the only thing that's different oh this is a string hold on it's not supposed to be a string the only thing we have edited is printing the tile width if that actually succeeds mostly what we're trying to figure out is is that the right way to access the tile what they're not which I think it is but I'm not 100 confident you probably should have printed some more stuff honestly it might fail anyway because I think it wants a string and I think this will be an int and that might make it mad I don't actually know it's not going to have a new line or anything though so even if it does print it's actually going to look kind of messed up yeah maybe that wasn't the right way I don't have a freaking semicolon on it that'll do it want to let's try more I guess let's do a string and then we could do percent d for a digit I think and then we can have a new line after it and then that can be like this is let's close that let's try those things are the standard warnings they do look scary though because they're like inside of a file called panic arch seem like they would be bad got our build let's go to bootloader to there a little bit washed out that did not really hope pw it did 570 oh but tile width is not what we want we want width not tile width tile width is the number of pixels in the width of each tile width is the number of tiles in the tile grid which is the one we care about actually so that's width and height and then let's try this mpr validate int min of scroll area with minimum or should we allow one by two I don't know it gets complex if we want to allow one by two I guess we would need to like check one and then also check the other one we'll get feedback on it if we smith pr I feel like a minimum I mean honestly like four by four or five by five or something something like that I feel like should probably be the minimum I suppose there may be cases that where you want some less yeah it is a good question do we want to allow one by x so like one by four for instance should that be allowed and if we do our int min like this it's going to toss it out because one is less than two so even if we did have so so what if we did validate int min of the width plus can you add I don't know these might not be like like addable honestly so if we add those together in a one by one that would give us two in anything bigger it would give us at least three so if our min here says three that means that a one by two should succeed a two by one six should should succeed but a one by one should fail and also anything bigger fail zero might do something weird I don't know what zero would do though zero might mess it up this takes also the arg name which is a q string thing the variable yeah the problem is it's not just it's on the tile grid right so so string it's a scroll area well and it's also yeah maybe we shouldn't be doing the plus thing honestly trying to get a little tricky the problem with that is we can't actually put like what can't actually put the the real thing because this would be scroll area I guess but it's not technically really the scroll area it needs to be greater than two it's the scroll area width or scroll area height and then if we do actually want to allow the one by twos then we wouldn't know which one of these to specify okay we're gonna say we're gonna Xna the plus thing we're not gonna do this instead we're just gonna say with minimum we're just go two by two let's just say you got to be two by two with minimum is two scroll area but I don't think I can have a dot here but I don't know we could try it I assume this doesn't work I don't I would assume you're not allowed to have it read in that if it does let us though that would be pretty convenient one wide by four high could be used for vertical text along a graphical axis that's true yeah one wide oh yourself a little like edge you put one character one digit in each one the way that would scroll would be kind of weird though using a label might end up being easier depending on what what you're trying to put there is the way they scroll I think makes it where you couldn't really set like like if you set all four then you couldn't just change like the second one very easily you'd have to write all four again I think or as with label you might be able to just set the second one to something okay yeah it does not like the dot there not a request remember width in something not a structure or a union I mean I guess we could say underscore here I'm sure if that works either though it might need to be literally this in which case we might not might need to write our own exception message not sure if you can put arbitrary ones here or not oh we don't have semicolons so spoiled by javascript requiring semicolons but not like caring if you don't have them very much has no member named width what that does we printed it it worked I'm missing something I have an extra print statement somewhere that I forgot about those actually what was printing I don't think we did ever I don't think I did ever print this version with the new line and the percent d has no member width you know what's weird is this one says has no member width but this one says has no member height did you mean tile height but there's a tile width too I wonder why it doesn't suggest it interestingly it has the arrow red here and the name red here wait that feels like we failed to close something right still fail did we not stick did I swear we got a successful run that has gone near duck crossword puzzle answers a crossword puzzle would be exceptionally hard with terminal IO I think unless if there's a way that you can fill in the cells other than the right function like the code we have currently is just calling right on the terminal which basically causes everything inside of it to scroll which would make it tough to do a crossword puzzle you'd pretty much have to track the full state of the board and call right on the entire board state each time I think sorry about that let's say maybe we just needed a clean build but no oh because it was tile width that I did I mean it has a width also bitmap width it would give height to the tile grid in tiles this must be why it doesn't work right we don't have a width on this there's pixel width there's width and tiles I'm assuming width and tiles and height and tiles is probably the ones we want but there is no just width or height but there is a tile within a tile height I'm guessing that's why we were allowed to do that one so we can maybe say width and tiles what's that print I actually know if that will work it does not seem like it const char like the const char oh okay now we get what I thought would be the problem the first time which is that it wants a string and we have given it not a string okay that did build it would print the width we don't have the validate going on anymore um let's print the height while we're here and let's see if it prints the numbers that actually make sense and if it does then we'll turn back on the validates we'll worry about whether or not it can like we got some feedback from the author of vector IO the only thing I'd currently advocate for changing in here and looks great to me think you could use evalue as is instead of typecast it's doing a signed integer but no longer but no big deal either way oh unsigned here instead of sign instead of signed play no big deal either way okay just got her anybody else's thoughts on that one just copy here we're back to the original error which is on a one by one we did get one and one here which is correct if we do two by two there we also do still get two by two it's still gonna raise the error it seems like you need to put this also so index with the validate it's min oh this is like a they're kind of messed up anyway truthfully in terminal IO support a strip of segmented alpha numeric led displays and I don't believe so if you mean like a seven segment you mean something like these I don't believe so and if you mean something different then I'm not sure exactly what you mean to the best of my knowledge though it only supports displays or like bitmap displays that essentially show a two-dimensional grid of pixels whereas those seven segments are not really a two-dimensional grid of pixels though I suppose you could think of them that way since they are just on off for each little segment but like not really in a grid they're in a special layout that makes them turn into actual numbers that did succeed see that's the thing though this is not going to raise still and it and it is still going to give you this error that's when you call right alpha numeric display uses htk this is looping over data was the string essentially going through each one it's checking them to see if they are commands seems like I guess all of this stuff is handling commands this would be handling ASCII this would be handling ASCII by getting the glyph out of the bitmap from the font and calling set tile so so I assume this call is where our exception gets raised from extra rules for specific characters that's interesting oh yeah hey there's um right then tiles and all this stuff that tile tile index out of bounds tile index is greater than equal to self.tiles and bitmap it'd be interesting to print all this stuff out to figure out which value is actually outside of which range because I mean we can add this check for minimum two but it's not actually going to stop it from raising the same error if you don't specify these also didn't actually six at raising good didn't have this yeah yeah yeah we didn't actually have this version running obviously because this version also doesn't work because that is the wrong name it's the wrong possibly these will not work also I'm not sure that's right let's see can terminal uh let's think it out loud again yeah no worries yeah just tile grids to the best of my knowledge but I don't think of it anything that doesn't display with a tile grid I don't think it does support okay that one actually did succeed we'll go to bootloader the furrow was too slow wait for another second and then go to bootloader there we go so it does let me do the underscore and it does successfully raise yeah so if we did one here but two here then it would tell us height well area height instead of so is that is that acceptable or is that the right way to do that should we do because we can't do a dot unless if there's some way to escape it can we give it one of these ones probably not right because this has like actual meaning inside the code I'd assume this is not what we would want to see on the python side anyway I mean on the python side the dot would be the most accurate thing but I don't know I don't think we can do a dot underscore might be the winner I'm gonna be super surprised if this one actually succeeds doesn't definitely got to run it see what a prince doesn't allow that arrow it says bad because it's trying to like actually use it as an arrow uh so I guess we'll leave it as underscore for now get rid of our prints and theoretically this solves the base case of what's got mentioned I will rebuild again just because this one I mean it should be functionally the same with the exception of the prince but we'll rebuild it again make sure I haven't messed anything up and then I'm gonna check this one out I'm gonna put it on the device I'm gonna test it one more time make sure it's still printing all the right stuff and then I think I'm probably gonna wrap up after that while we wait on the last build for folks that are interested if you want to watch more content like this I do stream on Saturday mornings as well so I will be back tomorrow morning at 10 a.m central time and I will be streaming some more circuit python stuff probably we will work on some of this display stuff probably we'll also work on some other things as well tomorrow but it will just kind of depend on what else I do tonight and what else I get done in the morning tomorrow before the stream um those are over on my own channels rather than the ate a fruit channel which is where you are watching me here that's uh over on foamy guy underscore twitch you can follow there if you want to get notifications you also just head into the live broadcast chat room in the discord though I will drop links in there as well since the youtube link is different each week I always put the link in there when I'm getting started so come hang out tomorrow morning have some coffee and follow along with some per circuit fun development if that sounds fun to you or I will be tomorrow bootloader copy that in yep I can just do your demo see you in the morning booting there we go so yeah height must be greater than two that's because the one that I left it on was the height one we go two by two then it succeeds but it's still gonna fail inside bright I see I think maybe we want to try to dig further because I think maybe we want to we either want to I feel like we either want to stop this stop this one from raising or if not stop it from raising it should have a better error because I don't it doesn't really tell you what's wrong here right like I guess it should say something about these or something I don't know I feel like though this error doesn't really tell you maybe there's some kind of way we could look inside of right and figure out more specifically what is out of bounds and what the bounds actually are we put that back then we can have our two by two okay yeah TW is right here it's called display.show what called group group strangely the display is still just showing serial it's not updating though see that I feel like I've ran into this one or two other times I don't call the exact sequence of events that got me to there before though feels like our display instance was like disconnected somehow that's our two by two with our three digits in it and then the kind of like end all be all test would be this one this should fail and tell us width needs to be greater than equal to two and then I did not make a branch for this so let's do that real quick new branch um validate terminal tile grid big enough size validate terminal tile grid size from ate a fruit main no track we ran pre-commit before I think that was interesting go to filmy guy I'll make a PR with that and then I will sign off for the night thank you everybody for watching enjoyed hanging out with all of you thanks for all the folks in the chat this is number 7885 and that is it for tonight so I will be back at tomorrow morning at 10 a.m central time like I said before I'll drop links in the discord when I'm getting started I do hope everyone has a good night tonight and a good rest of your weekend and all of that such stuff if I don't see you during the stream tomorrow I'm gonna cut off the stream now and I am gonna try to give it an extra minute or two before I push the stop button on YouTube to hopefully make it to where we actually get to the end of the real stream of me talking before it cuts out on YouTube we'll see if I'm successful at that though I'll have to go back and watch after the fact but that's it for now thank you everybody have a good night