 All right. Hello. Good evening. Happy Friday For anybody that celebrates Thanksgiving. Happy Thanksgiving yesterday. Here we got Live button here This one looks like it's showing good. All right Coffee this evening. All right, so let's see. We've got sound definitely to OBS So let's get that hidden away somewhere Let's get our chats somewhere that I can see How's it going? Be out of graph good afternoon slash evening slash Whatever time of day it is for you. I'm bad about Still need to come up with a good greeting that is time of day independent But it's nice to see you this Friday evening for me at least let's do this one How's it going Michael pocusa good evening to you as well Thank you to DG Devon for dropping the link there Howdy, maybe I'll try to go with howdy Let's see. I do kind of like howdy. All right, let's see So for anybody that's new or catching this for the first time or on video or anything like that If you haven't seen this program before first of all welcome. Thanks for tuning in This is the deep dive, which is a weekly live stream program where we are diving into the internals of circuit python That was the way that the show was started at least it was started by Scott shockroft the lead developer of circuit python As the lead developer he typically works at a bit of a lower level than I do So we do venture into the core from time to time when I'm on the stream But we also spend time in library land and other places around the infrastructure and different bits and parts of the project overall But let's take one step back for anybody that might be new tuning in for the first time If you don't know what we're talking about circuit python This is the main website for it circuit python.org. This is a version of python that runs on tiny computers called microcontrollers There's a bunch of pictures of them here. There's also a Live picture of one right here. That's upside down But over maybe so you can at least have a chance to read it if you want Microcontrollers that run circuit python. Typically, they'll connect to your computer. This one has a usb cable So we're gonna plug it in with the usb cable It's gonna show up like a thumb drive and we're gonna be able to edit a python code file That's on that thumb drive and when we save that code pile code file the computer which on this device is inside of this little metal kind of Protector case here, but the main computer is inside here And it will actually interpret and execute that python code for us Right on side of that chip and it can run independently of your PC Although using your PC is obviously super convenient way to edit the code that's on there So that is kind of what circuit python is all about today's device for me is this qualia esp 32 s3 rgb 6 6 6 40 p tft This is going to allow us I believe to hook up this really interesting Circular screen, which is what we've got here. So we'll be plugging that in here in a little bit But let me take another step back and just finish telling you about circuit python So if you want to learn more circuit python.org, that's a great place to go Also encourage anybody that wants to learn more to join us on the discord Which is linked down on the bottom of the screen a da fru.it slash discord during the live streams Typically folks are in the live broadcast chat channel Which is the chat that you see right below me on the screen But there's also a couple of circuit python related channels if you want to hang out in there Get help with circuit python or participate in circuit python development or just hang out say hi You know enjoy the wonderful community. You can do all those things on the discord Circuit python is an open-source project anybody's allowed to use it on their own hardware anybody's allowed to even port You know a circuit python port to their own hardware. So there are plenty of third-party You know companies and entities that create circuit python devices those entities. They don't have to pay anything to do So it's fully open-source projects. So they're allowed to just do that whenever they want The company that does you know keep the lights on so to speak the company that is Funding that open-source circuit python project is Adafruit. This is their website Adafruit.com They are a hardware and software company based out of New York You know most of the folks watching this are probably pretty familiar with them But you can head over to Adafruit.com if you want to purchase hardware from them and By you know spending your money with Adafruit. You're of course helping them To be able to keep funding the circuit python project So you can get yourself microcontrollers along with all sorts of bits and bobs to plug into your microcontrollers to interact with in the special today For festive Friday sale 15% off this whole weekend in fact So if you want to get yourself some goodies now is a good time to do it get 15% off if you can use the code FFS 15 At checkout so get yourself some goodies and thank you for doing so thank you of course to Adafruit as well for Supporting circuit python by paying the folks who work on it. There's a team of folks like Scott I mentioned earlier and a few others who work on the project full-time And there are some folks like me who work on the project part-time Doing various different aspects of it. So thanks to Adafruit and thanks to everyone who purchased this hardware from them Okay, so today's Device like I said earlier qualia ESP 32 s2 no s3 actually TTL RGB. So this is my first time using this device. This is my first time using one of these displays In fact, I was paid a visit by the Adafruit ferry earlier today And these devices just came so this is First time Powering them up the only thing that I've done so far is take them out of the packaging So we're gonna need to get it hooked up and then we're gonna need to figure out what libraries and stuff We need to get it running and do that and then once we get that running. I have in mind a new Submission that I saw go by the other day in the Adafruit shapes library that will be perfect for this type of display And that'll make sense when we get to it. But first, let's get the display itself up and running How do you see Grover and nice to see you today my friend? Let's First thing first is it's gonna be plug it in one thing we might do is Go find that round. Yeah, I don't did I get touch? Does this have cap touch? That's pretty interesting Yeah, I guess I did get cap touch. Okay, so Um, let's go the guide. Is there a guide? Oh, yeah, there we go And again, so this is my first time with this hardware. So we need to get the ribbon cable plugged in And then we can power it up And it looks like our orientation is kind of vertical ways like this. So I will uh try to maybe do Something kind of like that One thing is I will need to probably we'll see if I can get this plugged in without pulling it a bit closer Uh, I may have to get it out of the camera in order to get it plugged in But I'll give it a try here And so I believe these are uh pretty standard ribbon cables. Let me get this one just wiped off just A bit of fuzz on there. Okay. It's always good for your ribbon cables. Make sure they're nice and Clean free of debris Debris debris. I think that's debris. I don't know why I want debris there Um, free of dust and dirt and hairs and all kinds of stuff. So We are totally out of the Our little flap down here I think that's in We'll turn this We can't quite fit everything but honestly all the action is going to be on the display There's not much to see on the microcontroller We'll plug this in. I don't have any idea if it's got a I mean, it's probably got some code pre-loaded Uh, but it may or may not be Code that actually interacts with this display and it looks like it is so that's pretty cool Yep, let's do that one right there. Very good. Thank you. Okay. So yeah that powered up right away There's some pre-loaded demo code right on there Um It is probably Arduino. Uh, so if we check, yeah, there's no Circuit Pi drive. We're gonna have to get circuit python loaded on it But this tells us, you know, our microcontroller is good. This tells us our display is good This tells us our connection is good. A lot of good stuff going on Uh, with that a pre-tam das. Hello to you, my friend. Thanks for tuning into the stream Uh, do you know how does the circular screen behave in terms of the dimensions? Like how does it define a resolution? Is it like a rectangular screen but with some pixels simply not present? So x zero zero is outside. That is my understanding. Yes My understanding is For this display that I've got it's 480 by 480. So it's a square And my understanding is there are simply just pixels in the corners that are not visible You know of that 480 by 480 what you actually get this is a total gas on my part So we'll discover if i'm correct or not together. Don't take this as fact My guess is that you get a 480 diameter circle And then whatever pixels are on the outside of that Are just gone are are you know not visible you could draw to them. You could set them You can send them to the display, but my assumption is they just won't get seen um I would presume there's Something in this about it timings display That's a lot of magic bits there tft pens This is not circuit python. Is it? is well, it's A micro python in a way What is this this is not circuit python though. What is this is like c or arduino? What is this? It's well arduino Oh, it says micro python though Is this like a core driver shared bindings? Okay, I don't know. I don't know if we need this. I don't know what this part is If a board is tied to a specific display then the board definition Can initialize the dot clock display Oh, okay. Okay. These are examples of initializing the display if you want it to be on board dot display, I think Okay, that's yeah, I think that's what's going on here And then this is python code. This is not c. So that's stuff up there. We'd need to be in the core This stuff down here is more circuit python Layer stuff and I think there's a library for this now. So Like ideally we're not going to be diving into the nitty gritty of all of these Different exact things here Speed these use itc dot clocks. I guess this is like All kinds of displays well, uh 480 is actually if it matters That's the page we were on Oh Okay, there's a square one too. I mean my guess is that the circle one probably thinks it's the square one Like it probably doesn't actually know that it's a circle. That's my assumption Round. Oh, there it is. Oh, that might have been the one I was on Um, yeah, it doesn't actually say on this page Oh, interesting I don't know. There's a spec sheet displaying it. No, yeah, there's a spec sheet that probably Goes into more Details i'm gonna skip i'm gonna skip on for now. But yeah, my guess is it's the square and just doesn't let you do the Doesn't let you do the corners. Let me catch up on the chat here as well Tithe says that's my understanding as well and hyal has gone tithe Nice to see my friend mine came with no code had a flash Uh with the python esp tool not a big deal, but could it be tough for a beginner? Yeah, not a big deal, but could be a big could be a big deal for a beginner could be harder for a banner Yeah, that's true. Uh esp tool is a bit of a tough tough one I will say a good alternative dsp tool is the web uh based one, which I find Even easier to use in chrome. I think it's chrome specific Um, I found that one to work pretty well. I think make melissa worked on that Shout out to maker melissa It's a 720 square. I have to adjust the circle It comes with the callia guide. Okay, I'll have to check out the callia guide Here's a question for you if I display a bitmap Partially obscuring a qr code would be expected to render more slowly Over the area that obscures the qr code Doing to have to work out alpha or pixel um Not positive that I understand your question all the way is I Here I'll I'll tell you what I think Uh, I'll try to tell you I'll have to show you because I can't really explain it very well I'm not necessarily one with words, but let me tell let me show you what I am imagining You mean and then you can tell me if that's correct or not. So you have a qr code I'm going to use this blue square. We're going to pretend. It's a qr code You have a thing on top of it. Whatever that that may be a logo or something on top of it I'm going to use this uh smiley face, which we'll try to turn yellow briefly quickly, I mean uh line color Color fill You have a thing on top of it. So you have now a qr code and a thing on top and are you asking does it effectively work twice in order to fill in this section that is obscured now by the Thing on top. Are you saying like does it draw the qr code and then go ahead and draw this on top thus You know wasting its effort by drawing the qr code behind Uh qualia library I've been using for the 320 by 820. Yeah, I saw that really skinny display I almost uh, I almost got that one. I ended up switching over to the Oh wow, there is a deer in the backyard right there. Okay He's like yeah, anyway, uh How's it going dexter? Nice to see you Let's see Qualia library. Yeah that skinny one is really cool Make it square. Eight of fruit tights guide. Show us the qualia library. Nice. Let me copy that Yes, but Face only half covers. Okay, so if this was over here instead Um I don't know for sure. I my instinct is That yes, it's gonna do double the work or whatever like my instinct is that it is going to spend time and effort Rendering these pixels back here and then it is also going to spend time and effort rendering the ones On top of it Um, but ultimately it kind of boils down a little bit to how you do it If you just do it kind of the easiest way to code With the qr code library and then you know splash a bitmap an on this bitmap or something on top Without anything more fancy going on than I do think it will spend time drawing both if you Use one bitmap And play some tricks in the code to where you can render only the parts of the qr code you need I do think that's possible. And so you could avoid some Duplicated effort, but you would also Have to spend time working out the parts that you need so it may or may not be net positive. I don't know Hidden true than false Yeah, I think that it I think that it will by default spend extra time Like I think that it spends time To create the qr code behind even though you can't see it in the end of the day It now what it may not do like I don't think it would spend time like sending the qr code via the spy bus or whatever Whatever bus is in Use display io. I'm pretty sure only sends The parts that Are visible the parts that are in front or on top so to speak um But the qr code library would still spend time rendering that part of the qr code bitmap. I believe Um, okay, so we need to get Did I grab this copy still yes Oh, uh, I got a 404 on this one. Oh, I uh copied too much. Here we go Okay, we need to check out this library as well too. I don't think You get graphics displays peripherals You go qualia, and then it looks like probably each one of those displays has a constant. We do that tell it our rotation And after that We pretty much just have a display like a normal old display io display that we could then set root group and do our stuff on so we should be Pretty good there. Uh, what do we want to grab here? I guess let's go I know oh Looked that way. I'd hoped if the top one was not using transparency and palette And the qr was fully obscured the no impact but wishful thinking. Yeah, I mean, I think you could I do think you could play some tricks in the qr code code the code that renders the qr code Um, it could be made to be a little bit more efficient. I I presume But yeah, like I said before I also don't know if it would be net positive since you'd spend time calculating Which ones need to be drawn? Uh, bot zerker over in youtube says hello appreciate eta fruit's existence. Nice. That's awesome. Yeah, thanks for dropping by and mentioning that I would totally agree. I know I am here streaming on the eta fruit Stream and it probably appears as though I speak on behalf of them and I do to say thank you But also as a user and a member of the community. I definitely appreciate And i'm thankful for their Distance in the community as well. Okay, we need to get the reset button Which is Where? Do I see a boot? Button and okay, here we go. This must be up down reset. Oh, that's interesting. I thought reset I think on the matrix portal Is reset closest to the usb port, but now it's swapped to forest potentially The one thing is it does have a boot button. Uh, I don't know if it has uf2 bootloader already So what we're gonna do is try a double-click reset Uh, that does not look like it work. Let's try a slightly different timing. I don't see a neopixel Yeah, I don't see a neopixel and That didn't get us there either. So now what we're going to try is hold the boot button down and then press reset so hold boot button press reset and then Do what we have Yeah, we might actually be in the same place as uh PJ devon mentioned before which is we need to use esp tool or the web esp tool like I was talking about We need to load it. Basically, it's looking like we don't have uh uf2 bootloader yet Well, I say yet. I don't even know if it's possible and again, this is my first time using this device. So Does it say anything about the boot loader anywhere maybe on this circuit python we're on what is inside there circuit pi drive Okay, follow this. It says qualia does not have okay. That's good to know. There's no Neopixel so I just I wasn't just missing or anything double. So it does say double click Look it in using a known good cable double click reset Let's double tap reset Half a second tap again. Some boards may not have uf2 double clicking does not work follow install bootloader in this guide bootloader install bootloader qualia ships with If your board has you do not need to try to enter before okay, let's try a couple more times I am in I am in like a rom bootloader mode now because I held this but let's try double tap a few more times Let me catch up on the chat also I believe the final output of the display is updated to display after all the operations have finished that frame. No Well, yes. Yes and no. I think yes in In uh in theory, but also if you have auto refresh on then when that happens could be Not necessarily under your direct control But you if you have manual refresh, then it's totally up to you and then yes, I told it sends when you call refresh Uh possible with that many pixels a little slower. I mean the display is huge for microcontroller I think there has to be an additional data look up to store an alpha value masking raw render A little memory No neopixel and no you have to run most. Okay. No bootloader most use web. Okay Respatch didn't have tiny usb was in the library. Yeah, big hug to Melissa. Yeah For sure the library is gonna make it a lot easier for sure Uh Okay, so we will let me let me try maybe one or two more times just to make sure I kind of am thinking it's probably not there, but There's that so this Half a second. It's a one more It was a little slower. I think still nothing right. Yeah, okay It was a second boot of ROM. Thanks to the ROM. You don't have to worry about damaging Everybody disabled and race users Factory I actually need a factory He said though, how do we this doesn't tell us how to do the boot loader you reset and boot loader repair Is the next page Okay, so just the title here is only half of it. Oh, I don't think that's gonna work Chrome browser I did I guess I did set up esp tool the other day for doing something else He didn't in instead of you have to go to factory Go for factory. So yeah, I didn't I was looking at the title only to realize boot loader was on factory reset page Then Yes, three three It's weird that I mean, but it calls it factory reset Factory reset and boot loader Plugged in data sync press and hold so we need to go to rom boot loader mode He saw me do it a minute ago. I'm just gonna do it again real fast without switching the camera We should be in rom boot loader mode now. It doesn't really tell us anything Visual but we can do this. So we're gonna crab this link. We're gonna go to here drop that go to this connect That is gonna be this one connect It's gonna do its stuff. We're gonna then do what we are gonna choose our file Where did this have so many things here? What is all this? Where's the browser we were in? Display does freak out during an ottery start and we'll use manual refresh never mind Open instead of you have to Let's press connect Some systems mac javascript code Yes. Yes. Yes. Yes. Yes erase This will erase everything once you have successfully connected the toolbar will appear Erase I want to say I need to keep this like in focus. So what I'm actually going to do is scoot it over here Oh, it's done already actually I think that I don't know if it can work in the background. I feel like I used this web usb serial thing once I mean, I've used it a bunch of times, but one of the times I used in the past I thought I was minimizing the browser and it was actually not Going while it was in the background, but that could have changed in the interim that could be Just me imagining it also you'll see a racing flash do not disconnect immediately continue to programming programming Choose a file click on the first choose a file Find the bin that we downloaded Probably we just press program, but it's good habit to actually read the instructions Verify offset box next to file instruction is zero zero. Yes Once you choose a file the button next to that will change to match your file name You can then select program to begin flashing progress bar will appear Zero that changed we press program progress bar appears It's actually going pretty quick You like in the past this was a little slower. Maybe it's different for different devices Connect to race pick bin program reset board I do it On the edge of frequently enough to actually memorize it I would say like I probably could do it from memory, but I also know that if I mess it up Then I'll have to spend more time trying to fix it. So I'm a little Deliberate and extra slow. It does look like it succeeded around the new firmware reset your device So I'm going to reset once I'm not exactly sure if that's going to take us right to the bootloader or if that's going to take us Still to the demo. So all I did is press reset once it did take us back to the demo with the rainbow action there We do not have any circuit pi still which obviously we wouldn't we don't have circuit pi, but maybe double tap now There we are tfts 3 boots. Okay. Did we ever download a uf2? I think I did Need to clean up my downloads folder Yeah, right there is uf2. So let's drop that Ready to follow the instructions in the future. You can just link people to this video. Yeah It depends on the day some days. I'm in a very like Adventurous just blow through it from memory and see if I do it correctly and other days. I'm in a Deliberately slow stop and read the instructions today. I'm more on the instructions slow, but I have uh Never actually bricked a board, but I have temporarily bricked several boards by just Blasting through stuff too fast, but yet I still do I still do it sometimes I can align say I don't but All right, let's see here. We should be on circuit pi now, right? Yeah circuit pi What do we have probably in our code? Pi is just like empty or hello world or something. Let's get this minimized. Here we are Good pie just hello world. Okay. Yeah, so then let's get this connected to to action. Let's see Uh, it's probably not on ttyacm zero. Let's go Let's check. What do we have? Acm one must be on acm one I could connect on acm one. I'm gonna press reset though and see if it comes back at zero because Honestly, it'd be nice if it was on zero Oops oops. Oh my word. I don't know even what this will do. I didn't know you could put a star here That's we should quit that before anything goes wrong I'm totally meant to do an ls on that one. Let's go ls I don't know what that I did. That's a weird. I don't know a wild card with to would that open multiple connections I don't know what that would do. It is still on acm one I'm gonna try one thing which is basically unplug it and then re plug it And if it comes up as one still then we'll just use one Suspected it'll be back to zero tomorrow after I reboot, but yeah, it's Okay, I like to try to keep it on zero that way. I can always just give it the old up Up enter here to start it up in my ide, but I will spend the next couple of seconds next time I'll spend the extra couple of seconds next time to get it Switched over. Let's get this reload Arm is unhappy with me rebooting so many times. Okay. I wonder is qualia frozen in It would make sense for qualia to be frozen in qualia hi res qualia Circuit python Cool that the new release comes with blink. Yeah, I do like the template. I do like that. This is in here Um, it's not a template exactly. Although I honestly I'd be I think it would be cool if this included some kind of like sample fields or whatever To open all the things not yet. Uh, let me see not yet. What uh, to open all the things the board is Oh board is listed as tft experimenter, but on the latest tiny uf2. It's updated to qualia Uh, I'm not sure what you said not yet, too. I probably I said something uh Little bit ago that I must have forgotten the context for sorry qualia. Let's see if the import of this works This will tell us if it's frozen in Nope. Okay. So let's go circuit install that one circuit install. Let's see if my version of circuit is broken I've been doing some work on circuit. That reminds me. I need to merge that branch Circuit I think is ready for another look I did some work the other day off off of the stream Uh, but I never did actually merge it back to the pr branch. Wow, that installed a lot of stuff I guess this is like, uh, okay. Yeah. Yeah. I was gonna say I guess this is like one of the portal based ones Okay Let's go back to here. So we should be able to import this now. So yeah, okay Let's get our uh, let's take this simple test. We might as well just grab that straight up Start with right What is that? So it's gonna I mean, we don't really need a wi-fi just yet. Um Yeah, I don't know. We don't really need the wi-fi See this. How do we Let's just so this is just printing. Okay, uh, do you need to release the displays Adafruit? Doesn't actually have it. Do you need release display? Usually you need like a display i o dot release displays I don't know We do need a different one of these see if this list it does not that'd be too easy. Let's see. You can't click through Okay, let's get back to It's gonna be the 480 by 481 Oh round round 40 No For 2.1 inch. Okay 2.1 inch 480 by 480. This is the one. Okay round 21. This is from displays round Do we need the small one or the big one? Square 34 Try this We'd need this I feel like we would need this too Displays has no round 21 Well, okay, this is a class though not like a Constant Displays graphics displays. Uh, okay. We're in the wrong spot. Here we go graphics displays Where's the constants? I'm sure if there's an RTD question. No idea not yet. Oh frozen right. Thank you Uh, that's what the night yet was to this that it's not frozen in Oh now there's two deer out there Let's clone this I'm tired of looking and get hub Then we open that Do any of them use round 21? There any usages if we go back to where we were Usages no usages. Okay, so nothing actually does do this one So we need to find those constants Why is there not on there? I don't know where they would be Plays load displays display folder files split. Oh, this is like dynamic Okay, let's print it. We could print it right when in doubt print it out, right? We need the python one though. We have mpy. Let's delete that top box qti Yeah, I want to use the library This one's got all the sequence for initialization and all that I want to try to use the library If we can Um, thank you though for linking me there I'll be this Divide I wish I could change the order of these with drag and drop, but it does not work like that I mean, you'd think it would be this Or like would be apparent from something in here. Oh, is it this? No, but that's the touch Let's just print it out valid displays So we should be able to print that displays that valid displays So displays print Displays dot valid lowercase I should have just tried honestly. We could have we would have gotten there Got in there if I would have just tried it That's weird that the code we first the code I where was that from the example has it as shouty Isn't it? Yeah, that's weird. This is shouty. Does this work? I don't know if this works I would be kind of surprised based on how this is now, of course, we haven't seen if this works either Oh, no, actually, this didn't work Has no round 22. So that doesn't work either. I don't know how to use this Maybe all shouty Let's try that They do need to be all shouty. It seems like this is weird the way it's built up I wish there was a maybe there is somewhere and I'm just not aware of where it's at Um, I wish there was a listing though. That's that said, here's all the valid ones, right? Because this is just kind of a Magic constant and it doesn't If I try dur, can you dur it? Probably where we should have started with is dur. Okay Anyway, though, it does firmware version chip version is doing some stuff. It's not really showing anything but I think that's because But we haven't done Anything so at this point if we print So, yeah, it's it is working, but a lot of it's cut off I feel like just for now Okay So that is working. Why is this red? Oh It's x but actually when we I guess that's because it's uh, it must internally I guess maybe it sets it to none or it sets the root group or something Let's try doing this print dur Follya, I assume this will have like a dot display. It's my guess or dot graphics dot display or something Um, let's make a group main group Bull's group. Let's make a uh Let's actually just do that for only right now This way, uh, let me uh move this so I could see the chat also Kind of the wild west for quality displays right now a lot of them in quick succession so fast software The signal software to catch up You wrote a panic you wrote a panic reset due to some stuck in a state concern forgot about that Let me see import release displays. Why I have no clue Is a weird release. Yeah, I think no, I mean, I think it needs I I think it should it should need that release display. Honestly, it's weird that this one doesn't have it But I guess it's internally I guess it probably happens inside here Or inside here Maybe not I don't know It's it's typically necessary when you are using a uh display that is not Built into the firmware Uh, if it's built into the firmware like board dot display, then the core handles it for you But if you initialize it in python code Typically you need this because what will happen is When you save your code pie It's going to re execute this again and then when it tries to initialize this display Typically what happens is it would fail because the spy bus is in use It you'll try to do it and it will say like warrant, you know warning bus in use or whatever Or i2c if it's an i2c display But it would tell you like bus in use and by doing this You're freeing the bus so that by the time you get to here. It's not in use and it can initialize Which is typically what you need to do Graphics.init. Okay, so it is in there somewhere Using a ruler on bisk bitmaps is nice Uh, let's see did this run I didn't save yet get rid of this one. This one does have uh Dot display So i'm going to go display equals qualia dot display And then Don't get entertained the cat for a minute I don't want my leg to get bitten which I don't So we then should say display dot root group So that the electrical system will stick here for a minute Group equals This runs it shouldn't do anything different Yeah Let's also get rid of this. Let's make a label label I'll test label on display text It's a new label that needs a font which is terminal And then what text just leave that test label anchor point zero point five zero point five Anchored position display width for two display height to We didn't add it to the group main group This label so now we should get text in the middle of the display This works Nice You make it bigger It happens in graphic. Oh, yeah, it makes a lot of sense. Nice. Yeah, you're on the four inch guide page Nice Do I have a Okay, no, that was a little speck of dust or something. I was gonna say do I have a dead pixel but Okay, we have our display up and running Uh, so now what I want to show you is brand new hot off the github presses In the display shapes library Those that don't know display shapes. This is a library that A python library that allows you to draw various different shapes using display i o and the new feature hug report to Bablok b. Thank you to bablok b who added this just very recently um Is arcs and there's actually a bunch of different arcs that you can draw So i'm going to grab this sample and this should look really cool on this display because it's all about Circles basically i'm going to not grab the whole display actually or the whole um Sample we're going to take only this part of the sample code This I will change a few things. Um For now let's get rid of our label Let's call our group. Let's just keep main group I already have main group. We already set it. Let's just use that You need to do some imports Your image isn't on the round 21 Why not it might be uh that there's no like source for it. That's the right size Yeah, we'd have to I mean we could try this one. We could center it maybe and it would still work We might have to figure out. Oh, okay. Well, those are probably pixels We might have to cut it down to 480. We cut it down. I think it would uh I think it could fit on this display as well Customizable radius. Yeah, totally. Yep, you can pick the radius. You can pick the Uh distance the thickness there's a cup. There's a handful of different ways you can configure them The sample one will show us here once I get it loaded up. Okay arc So it did install display shapes when I installed portal base I think or no, no does not look like it did. Okay. Let's copy that over I'm gonna well, it's I it should be released now actually so we should be able to do Install waterproof display shapes Should actually just give us the one that has this Pie charm is not going to recognize them Because it doesn't know to look in the lib Folder and even if it did it I don't think it knows what npy format is so it wouldn't figure it out anyway, but Those look like that's working. Okay, so we've got all of our pens main group time sleep So we should be good here. I think let's give that a run. Whoops on browser Whoa I think somebody mentioned that earlier that it goes a little crazy during the resets. Oh Is it boot looping? I just did it twice. So my computer does I think save like save the code multiple times sometimes and then By default if you have auto reload on which it is on by default then that means It's gonna restart every time a file gets written So my computer writes to the file and then writes to the file again the microcontroller resets and then resets again Um, but anyway, we've got our arc. So this one draws three different examples This green single pixel line here is one The yellow one which I think has a white outline. Oh, actually the colors are Way wrong. What is up with the colors? How's it going gyron manful? Sorry if I mispronounce your name there over on youtube But welcome. Thanks for tuning in my friend Let me do try the light See if that just washes it out too much or what Kind of give it right there. So we've got a green sort of single line pixel one We've got a red one actually with a different color outline. I don't know if it's yellow or white There's an outline on it. And then we've got the blue one down here, which is like a pie wedge um So you could totally make like a pumpkin pie or something if you wanted to by making like Six of these or eight of these and then rotating them around that might be kind of cool Okay So again hug report to babelock b. This is super cool the ability to draw these arcs We had the closest thing like this that we had before was um There's a pro there's a a gauge The gauge I don't know if gauge is the right name, but there's a display. I owe widget. It might be called gauge or it might be something else um, but a different community member made it It escapes me right now who it was But it's like, uh, it's like a progress bar that goes around A rainbow so to speak a semicircle so it fills up as it goes around Um, and you could achieve a similar kind of thing with this um The other thing that I think would be kind of cool is you could approximate like an old school Radar type action, right? Like if you had this blue Pie slice here if you were like rotating this thing around And you put a couple other dots in here you could get kind of a cool like You know submarine radar effect going on Yeah, so exactly so in our radar I think there's a gauge. Yeah, there is there definitely is a gauge widget What I don't remember is if gauge is the one that I'm thinking of it could be Gauge could be the one that's like a needle that points to like a like a speedometer kind of Um, because there is one of those as well, but then there's a different one That's like I'll call it like a round progress bar. Um, that's not the name of it either, but it's kind of what it is Okay So, yeah, this is really cool If you want to get your arc action on if you want to draw some arcs The way that you can do that now is inside whoops inside data fruit display shapes There is a example for it. I took the example code here and we got it running on this Inside of examples display shapes arc and it shows the way To draw the different ones. Um, if you'll forgive me, I got to run to the rest or mill fast. Sorry I will be right back in a moment Okay, we're back. Sorry about that It was not quite an emergency just yet, but I was Not gonna make it the rest of the stream and was only gonna get more And see and distract it. So it'd be good. We got about An hour or so maybe a little longer. We'll see how it's going towards the end But we got a little bit of time left and I wanted to not be squirming too much. Okay So, uh display shapes arc check it out. Um, one of the things I want to try to do with it is actually I want the python version. Let's delete that Lamo delete it. Oh, I should use circup uninstall circup has an uninstall that I never use Excuse me There's oh j. Uh j. Prasada. Um j. Prasada Jose David he made I didn't think he I don't believe he made the one I'm thinking of But again, I don't recall for certain so I could be wrong Jose has made a handful of widgets though several of the ones out there are ones that he's made The the one the the the what I'll call again the round progress bar this one sticks out in my mind because around that time I implemented The boundary fill Inside of the core which is like a paint bucket fill and so that That curved progress bar whatever it is called The functionality of it sticks in my head for that reason because I was Diving really deep at that time into the core to try and implement That was honestly like the first like really sort of even remotely major thing inside the core that I worked on Um, let me show the api real quick for the ones that are in the example And then I'll tell you what I want to try to tweak on this to play with it a little bit further So in this example, it draws a circle the circle is not new that was already existing That's just the dot in the middle right there There's our first new thing which is an arc it gets Uh x y radius angle direction segments Arc width and outline and this is the red one with the white outline right there So let's play with this a bit right now. It's on angle 90 Let's make that angle 45 Just get a look at what that does So that is like your uh angle like your overall, you know, kind of width or length of your arc there In degrees so 45 means we get a 45 degree sort of slice a pie there If we wanted, you know, a full semicircle We could give it 180 that would match the green I think yeah So now we've got kind of the same thing going as the green you could make a pretty sweet rainbow with this That'd be pretty cool Could be could be seagrubber Yeah, I don't remember for sure. I'll have to look it up. There'd be another good thing to draw in this display too Uh Angle let's drop that back to 90 and then okay, so direction. Let's change this one. Uh next I'm gonna save this. Let's let it run on 90 So that's back to the original now Our red and white one there. So direction here. This is which way it's pointed. So right now we're on 90 if we go Let's do zero then I think it points to the right So I played with this a little bit the other day. So I know some of this. Yeah points to the right so we can You know 90 was our length our total width and then this is now our direction. Which way are we pointing? Uh, and it starts to the right and then it works its way counter clockwise So 90 will get you to the top segments really segment well segments I think is like, uh Like how many polygons is it going to use to make? Yeah, I think it's how many polygons. So like if you look at this one, it's a little bit blockier now It's not quite a smooth curve. It kind of has these straight These straight segments This would be like a triangle. I think maybe Yeah, well not a triangle, but like a you know a greater than sign almost Pointing up and arrows. This would be an interesting way to make arrows. It's not really meant for that, but Yeah, so when we have segments too, it's it's how many polygons are we making our curve out of So the more segments the more polygons you make your curve out of the smoother your curve is going to be If you want it to have rigid corners and straight lines, then you would use very few segments And if you want it to have nice smooth curves And no rigid corners and no straight lines, then you would use a higher count of segments The more segments though, I presume like the more processing power and stuff it takes as well. So What else do we have? We have arc width. I think that's like the thickness So in the on our red one here, it's like how tall it is in this Up and down. I think Yeah, so we can make it thicker like that with the thickness And then we have outline and fill which is the same as all the shapes All the aterford display shapes Um, the green one is x y Radius angle direction segments arc width So they just set the arc width to one In order to get that single pixel Set the outline only And then the blue one which is the pie. This is the one that's actually the most different. What does it do? Why does it draw the Um, why does it draw the pie? Because of this maybe I think it's because of this So it has x y radius. All that's the same angle direction. It went backwards by 90. So Uh, we we were turning counterclockwise This one is now going to turn clockwise to end up pointing down just like it does 10 segments and then what it's done here is it's basically made the arc width The entire radius of the circle that this would represent That's pretty much what it's done Because this value it's using right here Is the same Minus five though, uh and the five is actually probably just the Size of this one in there. I don't know Yeah, I think the five is because of this one in there What does it do if we take this out? Can't tell the difference put it back for now So by giving it a super huge arc width by giving it an arc width That's basically the same as the radius you make it. So it's gonna draw a pie. It's gonna draw these two straight These two straight edges here because these two straight edges are basically the same as these two edges here Conceptually, right? They're just the straight parts of the Little macaroni pipe there. It's just this one is much wider. So They kind of meet in a corner there If we would take this circle off, we could probably see a tiny little cutout circle there Oh, what's that? Let me catch up on the track here, too. Would angle 360 with x segments create an x sided polygon? Um, yeah, I don't know. Let's try it though Let me also see this see Grover. So this is a Pretty sweet looking gauge going there. So that's got a display Wow, that's a nice looking gauge. I don't know. I think that is different from the one I've seen before Or it's got a lot of extra stuff putting on it at least Nice. Yeah, that's really cool looking. Is that a uh looks like Try a rack A uh a rack widget there. You're a rack nice Okay, so let's try this. Let's go angle. Let's go 360. This is the green one. So 360 this would make it a full circle My instinct is yes. Yeah, my instinct is yeah, you can make regular polygons. I think by Doing angle 360. I don't know if regular polygons is the right term I think that is a term, but I don't know if I used it correctly So if you wanted a let's say pentagon, you would set this to five Yeah, so now the green one is a pentagon Maybe make this a little bigger If uh, if if you're familiar with open scad, uh, which I happened to use earlier today So I'm not only familiar with it, but it's also just on my mind today You're familiar with open scad. This is basically the concept of fineness in open scad They use dollar sign f in for the variable that represents this concept So if you wanted a hexagon, then you could do six You know you could do an n gone right whatever number you set there You're going to get a regular polygon with that many sides And if you set it big enough, then your regular polygon with that many sides is going to look like a circle to the human eye Your rack vco module looks like an infernal device. Cool. Thanks. Yeah for sure Uh, it looks amazing. Yeah, I definitely agree with that yeah, so um extra Extra credit there on the arcs you can use it to make the regular polygons You can there is polygon here as well, but this one actually just take Points, I think yeah, it just takes points So if you you could like you could make the same shape with this but You'd have to get these points either manually or Through some equation or something. Yeah, which like there is an equation that would get them for you In fact, it's inside this arc somewhere, but Okay, I would like to be able to rotate it right I As soon as I saw this Blue one here the first thing my mind thought of was like a sonar A sonar graphic thing where this is spinning around maybe it's a little bit narrower like arc here, maybe it's like Only like 30 maybe Something like that and then it's like rotating around And then like occasionally it puts a little dot because it finds, you know another ship or whatever right or a fish if it's a fish thing Uh, but can you rotate it? Yes, that is the not quite million dollar question But that is the the question of the day. Let's say the short answer is no The short answer is no you can't the long answer is It's python code and you know, we know python code. We could do a lot with python code So we can make some things happen. I think the short answer is though inside of arc it extends group It only has a knit. There's no properties There's no setters. There's no nothing. There's just a knit when you call a knit It does these things it calls super in it to create the group It sets direction to something Shift by that it creates a list for points. It loops over The number of segments plus one It does some trig in order to add the first set of points to the list Those are the outer points then it As long as it has at least two width Then it loops again. It does some more trig. It generates a second set of points for the inner points I think I added this print Maybe we should probably take that back out actually if that's in the official library We should probably take it back out. I don't know if I added it or not. I mean, I don't think that I committed Uh, I remember doing something like that, but I don't think I committed. Oh, this is blue though So yeah, I have changed it. I guess but what did I change? Is that what I changed? It is okay. I added this. Okay. Yes. So that's not in the official one So it does I added that for now And then it says if you have vector ios So that's another interesting thing about this is it has this conditional import for vector ios So we try to import vector i o if it succeeds we set that to true if it fails we set that to false If it did succeed we use vector i o polygon Uh, if it failed then we use Display shapes polygon instead So right now there is not really a way to change it what we would need to do to change it If we hypothetically would want to change it we would need to Recalculate all of this We would need to recalculate this based on the current value for direction We would need to recalculate all of these points based on the current values for angle segments direction Radius arc width all this stuff And then once we had a new list of points we would need to Either create a new polygon or change the polygon. I'm pretty sure you can on a vector i o specifically on a vector i o polygon I think you can change the points maybe I think you can So I think I tried to use it for rotation once Yeah So it says points is one of the parameters one of the arguments, but it also has points as a property I think you can change the points Okay, so i'm gonna start and we're gonna start hacking up on this arc So I want to be able to update it. I want to be able to rotate it specifically Arcs will simplify this. Yeah, I forgot about that About your one of those electric eye widget. It's I forgot the name of that. It's like an old analog sensor Had a few overlapping shapes to get that one to work Trying to update mind alpha five pulling down boot button turns part of the screen yellow Yeah, the screen whenever I whenever mine's resetting the screen is definitely getting a little crazy on it for sure It's okay. So what we want I want I think we're going to refactor this to have def underscore Generate points and I'm gonna put all of this inside of there Except for this actually It's it's gonna be just points Self dot points actually Self dot points Yeah, self dot points And self that direction Oh This is weird. It's gonna like change your direction on you Okay, I'm gonna actually make these underscores like this We're gonna call this shifted Direction, I guess and I actually I think we want to keep all of the things so self dot angle Angle self dot segments Segments How's it going my friend over on youtube my apologies. I don't know how to pronounce your name segments He did direction already math.py because what's alpha? Oh gets created angle segments direction. We need thickness Radius and arc width. That's what the thickness is called radius Off dot is Score What we're gonna do is we're gonna make properties for these and then we're gonna make it call Generate points we're gonna make it like refresh itself whenever you Set them Partially though, we do want to split generate points from Create the polygon basically Generate points is in here Whoops All right, this will now generate points. It will put all the points into points. One thing we should do is make Empty that out first. So get rid of all the old points and then generate all the new points And then the next thing we want to do Or the next thing we want to refactor out def init poly Gons Which is this code right here We want to go self dot empty self dot queer self We want to remove all the old one. Well init polygon init Polygon it's only one polygon and polygon Actually, do we want to remove? I don't think we need to remove the old one because we really we only want to init once and then after that we want to Not init again, although it will be awkward a little bit because Display shapes polygon. I don't think you can update the points on but vector IO. I think you can So you for the display shapes one you actually would need to call this and create a new polygon But I'm mostly interested in vector IO because this device has that in all of the newer Devices moving forward. I suspect we'll have that have this copied anymore Oh, I didn't do fill actually We can do actually just self dot fill That one doesn't need the underscore Okay, so we have generate points. We have init polygon So in our constructor inside of init, we want to go self generate points And after that we want to go self dot init polygon And if we did everything right then this Is now back to working So let's check if we did adious. No, we have no adious Seems reasonable obviously since that should be radius some red wire on top. Okay, so that's back to working. Um, the angle is different It just mirrors the angle the angle is different. This was pointing down before Like our shift might have gotten us here Right, right, right because this had set it to direction shifted direction This should be shifted direction It gets used down here There we go. Okay, very good now now We should be able to call generate points which will recreate our list of points And then we should be able to set That list of points Back onto our polygon So create that I'm going to put it on self just for convenience. Uh, we don't really have to we could get it from other ways, but I'm just going to put it there So now what I want to do is so I'm most directly I am interested in rotation. So the first thing I'm going to do is the angle So I'm going to make a property property Def angle That is going to return self dot underscore the private angle and then we're going to have a setter angle dot setter Value new angle. Let's call it new angle This will go self dot Angle equals new angle and then we go self dot generate points and then we go self dot So for one thing we need to say if if not self dot If not has adder self vector I There's using let's just use this actually If not Have vector i o raise and all uh, let's see Can only change points With vector i o dot poly Gone I'm going to do it this way for now. So if you don't if you're not using vector i o This gives you an error not allowed to do it You are using vector i o then it does not give you an error, which means it goes on sets angle to there Generate points and then we can go self dot Polygon dot points equals self dot points I don't know why All of these lines have space in them Okay, so theoretically we should be able to set angle and it should update itself. It is sleeping here So that's every that's like 10 times a second. We could speed it up Eventually as well. Let's see though. So this is the blue one arc three angle Let's go angle plus equals one Maybe plus equals five I have no idea how well this will work if at all Nope, not at all vector i o polygon probably none. Let's get to here Arc has no vector i o polygon. Didn't I put it on self? Put that on self in it polygon. I mean, that's The same self I mistyped That's perplexing Is it because we didn't create it in here? Do you have to like explicitly create it inside of a knit? And then also set it inside of a function Is we called generate we called a knit Knit is where it should Off that vector i o I mean, does this not have vector i o? I'm making the assumption that it does That's wrong It does. Okay. Let's try it like that. I guess it's still fail. Oh, no, we're on this Okay, after all that it looks like I might have been wrong It does just say attribute error Cannot set attribute points I really thought you could change the points though on the vector i o polygon Cannot set attribute points Yeah, looks like it. Maybe I was just solely wrong. I do. I mean, I interpret this as a property Is this not a property? All right, we're gonna go to the source here and take a quick look so shared I'm gonna go to shared bindings i o It's gonna be c Okay, so get points is here and it Calls common how vector i o polygon get points set points Calls common how vector i o set points I mean from here it looks like it exists But I guess if we get inside there and it's just like raising exception So that common how that should be over here. I think inside shared module Set points vector i o polygon debug set points clobber points list On dirty So it calls clobber points list and it passes in a new points list Which sounds like it should overwrite the points list, which is exactly what I would want it to do So am I missing something Can't set attribute points type Self vector i o polygon print dur self the vector i o polygon So that from this code it it really looks like this should work I don't see where this is getting raised from either. So I don't know what extra confused here Okay. Well, there you go. That's none That's there's your problem So vector i o polygon is none Does this not work? What vector i o what the problem is this says if arc width greater than one Ours is not on the blue one. So we're not using vector i o Is that true arc width? No. Well, no because our width is gigantic actually Because we talked about that earlier our width is the whole pie size That back does this print before our type okay, so I don't know. I seem to be having a failing of object-oriented python code, I guess because In my mind self here So that should be the same self that's here the same self that has all these things The same self that we then are here Super confused Maybe we're calling angle before we Doing it that doesn't make any sense length is one Definitely have the polygon And I mean we could even say print type Self zero this will be our polygon But why can I not have it on self vector polygon? That part worked. Why can't I not have it on that? That's weird to me. I don't understand that I feel like if we put this here When we are inside of here, it should still have its value, right? Why did why would it not? I mean unless if something else was setting it to none like that's possible Something else could set it to none and then it would be none, but That's not happening. Do I No self gets passed automatically I don't know. I do not get it. That breaks the rules of storing stuff on self that I am familiar with This is like totally legit Totally legit in the rules that I'm familiar with but Somehow that's actually null. So I guess we'll use self zero And we'll just assume that Nothing else has appended Anything to self Yeah, I don't get that decline where 100 So I did that in order to try to see if it would make a difference and it didn't my prince back But that one we did not have originally and I put it there like my thought on that one was like maybe because we don't set Vector io polygon inside of a knit Maybe that means that The one that is inside of here is like local or whatever, right? Like a different instance. That's not the same one as One here and so that's why I went back and set this to none here, but it didn't make a difference. We still get the same We do still get the same outcome Uh, thank you for mentioning it though because I did I should go back and delete it now I have it commented out, but we'll delete it eventually So it does still Yeah, so now we get 144 has no vector io polygon because it tries to say dot this But yeah, I don't get I don't get why That's very weird to me. Are we using both? My understanding was we were using vector io only But actually now I wonder if we're using both So vector io is oh, you know what we're not what I said earlier No, because this is too big It's definitely not one Turn these off our blue one is not a vector io polygon anyway Because I turned off display shapes polygon and now it's gone So if I put this back then our blue one's gonna come back and that tells us that it's not a vector io at all Which means we can't change points and that makes sense but it does It's creating one of one of each I guess but what is it using the vector io for? Okay, I thought this was either or but it's not it's if this is true then do a vector io thing and if this is true then do a uh Display shapes thing if outline is not none. Okay, let's do fill Let's do fill blue Now outline none. So now we're not using that one at all Which that's gonna that's gonna throw us off. I we want the I thought that one was using vector io too, but vector ios are always filled I should have I should have remembered that actually vector ios are always filled. They can't do outline only You could make two of them It'd be really hard to shrink it though. Are you setting up the display? Yeah, pretty much that well, I don't have a url this Complaints display not Um, I don't know maybe put your full code mine is Basically what you have I have a different display, but it's basically what you have the other the only other differences I don't have url I took out url and I'm using round 21 not round 40 And then it's on after you do that it's qualia.display Hey tim. Uh, hey, I'll join late looking forward to rewatching. Nice. Uh, yeah, uh, how's it going? First of all, thanks for tuning in some nice. It's nice. Nice to see you my friend. Hope you're having a nice day All right, let's try this now. So I think maybe we could get Maybe we can get our rotation action on this one. Yeah, there we go. Okay, so now our next problem though is that Get off the window Now our next problem is that, um It's like wrapping around Pretty sweet looking though. I'm not gonna lie Why is it wrapping around? Oh Uh, okay, let's say print Lane of points I want to make sure that that's clearing out and then getting Created and it should have the same number of points. I think they should just be different points But in reality, it looks like it's gonna have more points, but I don't know why we're getting more That works got an arc example going nice. Yeah, cool I would have never figured out display equals quality display. Yeah, I like to do that display equals Uh for built-in ones, it's like display equals board display, but I always like to set a variable called Lowercase display that way I can use it the same and oh my god So it's always having 22 points. It's not continually adding like I thought it was What's weird is it's like the number of segments are getting smaller As it goes around I don't know Oh, that's I guess because it's uh, never think Wait I'm doing the wrong thing aren't I I want to be uh this whole time. Yeah, I want to be doing direction not angle That's my problem Okay, I guess let's leave all this here really the yeah this whole time I was meant to be doing direction not angle, but I got a little confused there depth direction Turn Self direction Shifted should we do shifted? No, I think we should give them back whatever they gave us We'll recalculate shifted to be whatever we want when a new one comes in Not a fan of requiring portal base. I mean it doesn't require it per se right you can't initialize the driver without it Um, I like the one line import and initialize of the screen So I'm willing to do whatever I need for that if that's import portal base Then I don't really have a problem with it Especially since you're allowed to use like take and use whatever you want right like I am using I have technically imported and used portal base but We're just getting the display and treating it like a normal display and doing nothing else with portal base so like I don't know it doesn't really Change anything I guess Like it doesn't really change the way anything happens after we get the display So I just choose not to use that portion of it. Just go straight to display. Oh Um, let's go into Back down to here direction setter direction new direction Self dot Under score equals new and then we need to recalculate the Shifted direction Which is gonna come from self dot angle I guess we should recalculate this if the angle changes to Oh, you probably should recalculate this You need to do this actually before we call generate points here Since angle changed or could have changed We want to recalculate and then here we can go Same thing. So just set direction calculate the shifted direction then call generate points then call Please do not bite my leg, buddy Points and then we do this basically to update And then I actually do want direction not angle here This is actually the effect I was going for If it works how I'm imagining we'll see Yeah Nice Yeah, that's sweet. So if you could do something like that and then maybe Put some little dots in there occasionally Whenever it you know senses another submarine or whatever So, yeah, it does it comes with a lot of caveats The updating of the uh, the direction I'll use the proper term the updating of the direction is Possible but comes with the caveat of its vector. I only which means effectively You can really pretty much only do it on ones that don't have An outline like if this had an outline it would get Totally messed up. I think It's on our suite. Nice. Thank you. Yeah, I liked the way this came out too. Is there not a yellow? Oh, there's white. Okay Let's see the default for the default example, which is the wi-fi symbol toaster requires portal base Didn't figure out might not be much required Yeah, I don't know I go back and forth on it. I it just depends on what you want to do with it, right? It's going to be better for different people different ways. Some people want to just fetch Right away from an api that's got it json and they know exactly what they want to fetch or whatever So it's like super duper easy if they use that So because we can only update vector i o It means that if we have an outline it's gonna be messed up like this, right the outline is stuck, right? It's not updating we could achieve the visual effect of the outline updating by Like we could recall init polygon Instead of setting the points we could like delete the old Delete the old vector i o and the old display shapes polygon So like instead of this we could say Um self dot pops Self dot pop there should be two things When the outline is true, which i'm just gonna assume it is here. Obviously the code would Be a little bit different if it wasn't we need some ifs or I don't know if that fails if there's nothing in there Maybe I don't know if it does so we'll remove them both and then if we called init Polygon again now it will work with the outline, but it it will be slower too. I think Yeah, it's way slower And it gets that blinky effect because I'm not actually sure why maybe it uh display dot auto Be fresh equals false Let's try this Maybe this might get rid of the blinkiness We don't have display in here All right, right. Yeah, that's very difficult actually. Um, okay. Yeah, let's just move that out I mean we could just turn it off. I suppose Then just call refresh after the direction I think this might get rid of the blinkiness of the outline But it is still going to be slow Yeah, it got rid of the blinkiness It's got some weirdness on the edges like some of that Is the camera But some of that totally is the display as well some of that weirdness on the edge I can see some of that with the naked eye. I think that's just like how fast it's updating the display Versus how fast it's moving Because it's doing the display shapes now Like that part's way slower When we had only the vector i o so only the fill with no outline That can actually go way faster because updating the points is way quicker than uh recreating both the vector i o polygon and The what i'll call bitmap polygon but display shapes polygon we could try to Like let it go faster, but I think it it's like going to be limited to Also running faster like this seems to have exacerbated our staticky edges Swing the other way. What if we said quarter second or no one one fifth of a second and then what if we said Let's try 10 degrees instead of Something like that's not a bad effect. I mean we are Getting back to having a whole lot of weirdness on those edges though I think that's just kind of the refresh though. That's a bit that might just be the nature of the beast on the refreshers on these displays I don't know Um, but with vector i o it looked pretty good. I think if we went back to the vector i o one without uh Without the outline it looks pretty solid. I think well Yeah, obviously it looks solid, but Can't change the circle fill background color to anything other than black It's just the center of the dot never mind. Okay. Yeah, I'm not sure what you mean Perfect for this time of flight since around a mini tank turns and scans the direction Move in after encounter. Oh, yeah, that'd be super cool If you had like a yeah Yeah, if you had a time of flight and if you're rotating around and so you're like seeing the obstacles if you can keep track of your 360 Um, then yeah, you could totally plot points in here or and show like which direction it's looking at at the current time That'd be a sweet sweet output. I think for sure On the four inch round I get a noticeable flicker The bigger the display is yeah, yeah, yeah for sure the bigger Exactly, right the more it really what it boils down to the more pixels you're changing the Longer it takes to do and the more of this kind of weirdness you're likely to encounter Um Yeah, that's kind of the effect i'm i'm after for sure We won't be able to do the fading the way it does on those like it kind of has that trailing edge That fades away. We don't We're not quite to the point of being able to do anything quite like that But yeah, if we if we did some if we change this up to a green and if we added a couple other concentric circles in here And maybe if we slice it up, I don't know if I like the I don't know for sure if I like the lines Might skip the lines. I'd have to see it both ways maybe Okay, well, it's something to think about. I don't know I don't know if it is well I guess really what it comes down to is I don't know how I would want to approach actually adding it for real So what I've hacked together here works um I would say it works better with the vector i o only arcs than it does obviously the joint display shape and vector i o arcs It does work, but obviously better on just the ones that are vector I think it might be worth trying to Improve the code a bit though. Like I don't think it's ready to kind of like pr this back right now I think What I would want to do is use this methodology if we can So like inside of here, we want to do a check and say Are we a vector i o only one, you know i e are we a fill only no outline if we are We want to do this If we are not Then we would want to do this Maybe we could pop only the display shapes. We could actually still do We could actually still change the points And then only add the display shape one that might get us a little bit of time back I don't know how much time it takes to actually create the vector i o It should be better on memory though. We shouldn't be garbage collecting the vector i o If we were to update it instead of create it Add in some okay palette fader actually maybe could do the trailing thing I don't know about around the circle probably with some trig. I don't actually know trig though My level of understanding with trig is like Just try sprinkling in sine and cosine and adding 90 or 180 Hoping for the best Guess and check see what it does. That's kind of like my level of trig understanding There is probably a way to do it though Yeah See you can do it with a bitmap You do it with a bitmap. I don't know that we have an easy way to rotate We have we have bitmap tools dot roto zoom actually that's probably the way to rotate bitmaps That is the way to rotate bitmaps. I should say Easy the only way I know of currently I think i'm gonna take off for now This is some good food for thought. I think in order to be ready to submit I would want to take a little care here to have logic to like only do the points When we need to only do the points and not do this when we don't need to That would speed it back up for the cases that can be fast at least um Yeah, that's the main thing. I think I think it'd be pretty much ready ready to submit after that We need to like there's a bunch of prints. I added we could get rid of but functionality wise I think if we had that logic in there to Take care not to recreate them when we don't need to then that's At least to my thought The main thing it needs to do before I'd consider it ready um If you keep an eye on that if you're interested in this and you keep an eye on the display shapes repo Then you'll probably see me submit a pr in the next couple of days and uh, I would appreciate a review if anyone is interested um Or if not then you can just check it out there and eventually it will get merged in and you'll be able to use it um I will say thank you to everybody for watching Let me catch up on some of the chats here and then we'll finish up with the goodbyes. Thanks Tim. Yep for sure. You're welcome Uh, there you go. There's some trig x equals. Yeah radius center I don't know simple phosphor brightness fading is pretty doable if you're not trying to Chief transparency phosphor displays don't have the transparency in the real life Keith has a learning site was going to try to make a foamy guy icon real quick We can't seem to even change the background color. I thought that counts. Nice. Yeah I don't think I've ever put my little cyclops guy on a On a circuit python board actually I can't recall. I don't think I have Um, all right, uh, take it easy everybody. I hope you all have a good rest of your evening Hope you all have a good weekend and all that if you are Uh ready for some more circuit python action Uh tomorrow, I'll be back tomorrow morning at 10 a.m. Which is the normal time that I stream Over on my own channel Saturday mornings at 10 a.m. So I'll be back then I don't know exactly what we'll be working on yet if it'll be this or something else. I haven't quite decided but If you're interested in some more circuit python action, then I would encourage you to come back then Otherwise, I will bid you farewell. Thanks again for hanging out. Thanks for watching along Thanks for all the questions and comments and everything in the chat So long and good night everybody Uh, yeah, and thanks again for watching is all I'll see you later next time