 All right, let's see. Looks like I got sound into OBS at least. So let's start with some hello's to Devo Dessa over on YouTube. How's it going? To Mark on the Discord and Keith and Paul Cutler and Liz and C Grover. How's everybody's day going? Shuffle a few more of these around. Ham's Labs. Thanks for hanging out. What else do we have here? Dotted. VitaGraph in the YouTube chat there as well. So hello to everyone who's here. Let me turn this sound. Yes, and I see you. Thank you. I'm Brett Ninja. Let me close this. Is this in here? Yeah, there we go. Mark says, just in case you didn't know, you can hear your keyboard so your mic's probably live, even with the title screen up. Yep, that is true. I did know that. I do appreciate the warning nonetheless though. Yeah, the way I have it set up is those are just two different scenes and I think they share a microphone. One of these days maybe I'll figure out how to get the microphone off of the title card one but importantly I don't want to have to remember to turn it on when I switch to the other one otherwise I will forget and then I'll be talking and nobody will be able to hear me. Although you all are pretty good about letting folks know too so if that were to happen I imagine I'd probably start getting pings anyway. Lovely A72. Love the factory. A lot from the Colorado I'm thinking that is there. It's a good day to you over in the mountains. Dave Buchanan on YouTube. How's it going? All right so let me share a couple of links here. This is the note stock for the day if anybody wants to help me out by taking time stamps. It's definitely much appreciated. I know there's folks that like to watch the show after the fact and have the time stamps we've gotten spoiled a little bit on the deep dives for having really nice time stamps and then also I think ask Patrick W put together a script that linkifies them right into YouTube which is all a great way to watch it after the fact so you can jump to what you're looking for. So that's the notes there. If anybody wants to help me out I'll try to do a little bit better this week than I did last week. I ended up after getting a bit of a rocky start last week. I ended up not really putting any more of the time stamps in there so definitely slipped my mind but I think I've got things kind of set up a little more straightened out. I feel like everything is a little more smooth this week. I got YouTube up and running quicker and easier so getting the hang of how to get everything running and I have my notes right over here along with my chats so I'll try to drop the time stamps in them of which we can put one here and prior let's say hello's I'll put the first one in there and then yeah we'll do an introduction here briefly so let me uh another one introduction so yeah hello to everyone my name is Tim go by foamy guy on the github and the discord over there so you can hang out with us if you're interested on discord at adafru.it slash discord which I think is on the screen there is that right yeah it's on the on the bottom of the stream there and that's also the chat that is showing farthest down underneath me right underneath me is the youtube chat and then underneath that is the discord chat so if you want to hang out those are the two places where you can chat there is a twitch chat as well but I'll be honest I probably not going to be able to keep an eye on all three so I appreciate anybody that is over in the twitch chat if you are over there and you need to get my attention though if you have a question or a comment or anything like that discord or youtube is going to be better in the short term for me to be able to actually see it so those are the chats this is the deep dive program so we're going to be working with circuit python so circuit python is a free open source project that allows you to run python code on tiny computers that are known as micro controllers this is the website for it right here circuit python.org so if you are watching this in the future and you want to learn more about what we're dealing with you can head here circuit python.org you can learn more on this page one of the things that I always like to highlight though is these tiny computers they come in all different shapes and sizes in the background of this page down here you can see tons and tons of different form factors so you know round square different numbers of pins some of them have screens some of them have built-in buttons you know one is shaped like a ruler some of them are kind of like little handheld game devices so pretty much any kind of electronic project you want to do very likely there's going to be one of these micro controllers that will you know be an appropriate size and form factor for that project and we are writing python code that gets saved on these little devices and we're able to interact with other physical sensors and components in the real world so you know we can connect screens and lights and sounds like speakers and things buttons of course as we see a couple examples of plus all sorts of sensors and you know motors and and you know again pretty much any kind of doodad that you can think of that has an electrical way to hook it up we can connect to and control from this python code so how's it going Dexter thanks for hanging out so yeah real quick to finish up on the circuit python project it is an open source project but it is primarily funded by this company right here Adafruit this is their website Adafruit.com so they are paying the folks that work on the project full-time of course Scott the lead developer is who streamed in this time slot up until very recently he's taking some time off so I'm taking over while he is out for the stream but the lead developer of course the rest of the developer team Adafruit is paying all of us to work on circuit python and to do these you know related things around with the libraries and the community and the streams and this sort of stuff so if you want to help support the project one of the ways you can do that is by heading over to Adafruit.com and purchasing hardware from there you can get the microcontrollers you can also get all the things to plug in and do with your microcontrollers you know lights and doodads and speakers and buzzers motors and sensors and all kinds of things you can get from Adafruit.com over here so that's the the brief introduction getting into a little bit more specifics what I'm going to work on today I have two two kind of things on the on the plate so one of them is going to be porting this circuit python time stamper that I've been working on along with catney we're going to port this to a different form factor than the two that are available right now I don't think it's going to take too long so this is kind of the first thing I want to do and I thought it would make a good example of you know just adapting a project that used to run in one environment to another environment so we'll be making a new port of this and then the the second thing I want to get into is going to be much you know much deeper if you will down into the depths of the circuit python ocean we're going to be jumping into the core looking at vector IO which is a way that you can draw graphics on circuit python displays so I'll give when we do switch over to that I'll give like a brief high level look at vector IO I don't know if there is any video format media out there that shows what vector IO is and what it's all about so I'll do a high level introduction for folks that maybe have never seen it before and then I have a specific new feature in mind that I'm interested in trying to implement inside of there so that is what I will do after I introduce it so how's it going Thomas they're on discord thanks for tuning in Johnny how's it going there on youtube thanks for hanging out as always it's good to see you okay so the time stamper this is where we're starting let me on that note take a time stamp time stamp so here we go we're working on time stamper port okay so the time stamper is actually what I use to take the time stamps you know it's what I intend to use to take the time stamps during the stream and it is definitely what I use to take the time stamps during the weekly meetings when I host the weekly meeting so I've recently joined the the rotating cast of characters to host the weekly meetings and part of that responsibility of hosting is filling in time stamps to the note stock that we use and I whipped up this script the first time that I hosted as a way to quickly type the time stamp without me having to like actually look at the recording and see what it is and stuff like that and so it's kind of a one button deal let me see so I'll switch to the camera I'll show you what I have right now I don't want to I don't want to mess with the main one too much but we'll get to looking at the second device let me gently pick this up so right now I have a matrix portal device and it's running the time so I basically clicked the green button to start the timer running at the same time that I started up the stream and then this just slowly counts up by by seconds and minutes here and then once we get past an hour it'll also add up to an hour I believe as well that's what one of the changes in the latest version although I don't know actually if I put the latest version on mine so maybe it won't I'm not sure and then we have the second button down here and when I press the second button it will paste a time stamp as whatever time you know is currently showing on the screen so that's what I'm pasting into the notes and so I made this initially on the macro pad that one that you just saw catney then came and adapted the code to run on a feather with a neokey feather wing so this is kind of like the setup that catney had was I think a feather rp2040 or something like that just a basic feather and then this neokey feather wing which has two cherry mx key sockets and then there's neopixels and stuff in there as well and basically took the same kind of idea of like one button is start and then it starts counting and then the other button is paste the time stamp and then of course you know it sends it through as a keyboard essentially to the pc and this is really nice because it minimizes the size of the device of course the macro pad is much bigger than this little you know two by two feather situation here or even if you had a feather with a stacking headers then you could actually just stack the wing right on top of it and it would be even a smaller profile with this so this is really nice it saves space it doesn't really need all the rest of the buttons on the macro pad so that part is nice and as you can possibly guess maybe just by looking at what's in the camera here the thing that I intend to do is take catney's port and then further bring it over to specifically the feather esp32 s2 with the tft on it so right now the main difference between the two versions of this is the macro pad of course has a built-in screen so it shows the current time on the screen the standard feather you know rp2040 which was the the one that catney's was based on this does not have a screen on it and so there is some feedback in the leds they kind of fade and pulse when you're once it gets started and stuff so there is some visual feedback still but of course no screen so you can't see the the actual literal time so what we're going to do is kind of mash the two together we're going to take the screen elements from the macro pad version carry them over to the screen on this feather tft and then we'll keep the button behavior that is in catney's version from the neokey feather wing if folks are interested in this project this is the repository for it I just put the link there in the discord chat let me kill this little one box though this is awfully huge yeah yeah David I do remember actually David made one of these for a clue right around the time the clue came out I remember that and yeah I mean I do think it is a useful thing it is the kind of thing though you almost have to dedicate a device to it otherwise like if you just use it on one you know a standard microcontroller that you use for everything then like it may not have the code on it you have to spend time getting ready ahead of time so my intention is to kind of put it on this and then just keep it sort of on my desk as a as a one-off little device that does specifically this clue would be a is a good form factor for it as well though because it has the two buttons and it has the screen although the buttons are smaller I will say the cherry keys are really really convenient for just being able to reach over and hit them real fast so this is what we're working on to start with I'm going to jump into the code on the feather TFT but what is on here right now this is okay yeah yeah this is a older example I was working on for the NASA stuff or not NASA but US government yeah it was it wasn't NASA maybe it was NASA yeah yeah it was NASA the web telescope we were working on stuff with the different certificate that's all actually merged into the core now I believe so we're ready to kind of push this along a little bit further and I worked on that code actually not too long ago yeah purpose built project especially uh or uh exactly right I should say see Grover um what does that love the factory lofa it's like there a little FA maybe it's a neat looking board what is that a is it like a rotary thing on the in the circle there what does that part do but you're fascinating um fascinating design pop this chat back up as well king or north how's it going there in the youtube okay so I'm just going to save this as a separate thing here code as a cert test then we can just empty this and let's start with I mean we're kind of just smashing together the two because the macro pad one has the display stuff ah smart washer okay is that a board you designed for a smart washer and when you say washer you mean like a clothes washer or something like that so I think what I'm gonna do is want to start with one or the other I think I'll start with the code for the feather wing because that will have the key handling and then I'll just go back and add the stuff for the display time stamper button yes nice scrap playground okay I didn't see the uh note ahead of it crap playground uh Jane Hampton how's it going thanks for joining in the youtube chat over there unexpected maker good day to you as well um all right so so this is mostly set up so honestly we could probably run this one um let me another time stamp actually coding coding tft feather version and I'll actually kind of change this talking about time stamper it's really more what I did we could probably just run this on the feather tft and it would think work as is let's save that one thing I'll do is update my feather tft it's on alpha something something a while back uh we'll run this for now though module neopixel oh I don't know if circup hmm the circup allow you to specify a device path sorry because I have two devices I have the actual time stamper that I'm using hopefully throughout this broadcast and then I have the one that I'm working on and I don't want to install to the one I'm using because that will trip the reset path and then space directory no such option can specify a path uh yeah how's it going catney I figured this would be a nice combination of both of them and I had the the feather tft and I haven't put it into a project yet uh so I figured why not why not throw them together um options okay options has to come first I see so we want to go like this install that's looking better what happens uh when the working stamper gets reset good question it starts back at zero and is not going to help you take accurate time stamps anymore um I've thought about maybe adding a feature where you can put it into like a special override mode or something and then maybe like hold a button down in order to force it to count upwards um or maybe you have both buttons maybe you can count upwards and downwards or something um but yeah as of right now today if it resets it starts back at zero and it's not going to accurately tell you know it's not going to accurately keep the keep the time stamps for you anymore um so that would be a bummer although not the end of the world um I guess if I had to on short notice I could maybe go inside of it and like just quick edit the code to add something but um ideally we'll keep it running and not restart it that will be the goal um let's see timer resets yep 15 plus hours yeah can he ran it for a long time okay and is not watching the stream as well uh maybe disable uh that's probably a good idea actually especially once I have the purpose built one I probably should do that how do you do you know how to do that is that in something in boot pie I guess probably update nvm I could do that but I'm afraid because then we are um then we're writing to nvm every second basically when the time increases um which would probably be all right for a while but I do think the nvm can wear out if you write too much into it um yeah if there was some like you know what would be interesting is if we had like a function that would get a callback I mean I have no idea if this is even possible with the way circuit python vm works um you know what would be really cool though is if if if we could like def exit or something right and then whenever the system you know whenever the system is gonna gonna do a reset if it could like look for this function and call it and then inside of here we could do our saving then we like only save to nvm when we're about to reset so when it's absolutely necessary um that would be kind of cool but I have I have no idea if this concept is even like technologically feasible uh to the sd card would work that's definitely true let me catch up here disable yep uh nvm definitely worth considering yep scott had problems with it resetting I assume you mean maybe back when he used the clue one if it fetched the daytime and set it to the rtc you can have time start since time since start value and a comparative seconds since epoch value that way if there's an accidental reset you could still recover the time based on the offset from the daytime sounds interesting sd card could definitely work you're using the macro pad by you're using the macro pad or by adding an encoder the 2 key version you could use the encoder to set the start time just dial up oh yeah that would be a lot nicer probably than pushing buttons uh encoders are nice how's it going bruce thanks for tuning in yeah david do you know the way is it a thing in boot pie is it like you just put a special code in boot pie and then it disables the reset for you I've heard of that being done before but I haven't ever done it myself um all right so let's get the label stuff from the macro pad one we're gonna need a couple things group label terminal IO those are probably the only new things we need so the one that had matrix portal but of course we don't need that display equals board display don't remember yeah no worries uh then make sure you disable a lot of reset because you probably forget to keep wondering why it resets then save my code yeah that's probably true I did disable reset it would definitely trick me one of these days I'd go to save something wouldn't actually uh wouldn't actually change RTC plus save the time then start up and verify that it's the is a recorded start time RTC I'll have to look into saving in the RTC that sounds like a pretty nice solution as well um all right let's jump back to here so we can uh let's see get in the display oh why did I set up macro pad oh maybe to get buttons oh and the pixels that's true okay yeah yeah and to get buttons as well okay so we don't need that that's all done separately now we can let's say grab this stuff and main group as well I'm gonna put one of these numbers side by side here we'll maybe tweak the location I don't know exactly where that's gonna end up on the feather this we can do this as well and then we basically are just gonna change our updating inside of here oops stopped uh writing the comment halfway through update the showing time whoa supervisor.disable auto reload nice and very aptly named I will um I will plan on doing that I can't do it now because if I save it then it will reset it but I will plan on doing that although well yeah no I was gonna say maybe I break to repel and then but then that's gonna definitely stop running anyway um so we want to animate I think we want to do all of this stuff too and then we'll just modify also the code when the send button gets pressed so because the macro pad version basically works by updating the label each second and then whenever you press the send button it writes the text that's in the label so the label kind of becomes like temporary storage for the current time the feather wing version does not it keeps a string which holds the current you know time and then when you well it's actually not that it even keeps a string it's that when you press the button it generates the string and sends it out the keyboard all at once of course because it doesn't need to keep it because it's not showing it anywhere so what we'll do is I think adopt the macro pad approach we'll change the label every second and then when we press the send button we'll grab the value from the label send it through the keyboard like how we've gotten to the point of yeah yeah definitely yeah we've come a long way for sure of like try to keep it running for as long as we can I was surprised honestly cat cat me kept this running for like 10 hours or 15 hours or something so I was surprised it kept going eventually we should probably switch over to ticks as well eat a fruit ticks right now I think this is just timed out monotonic so it would drift it will drift a couple of seconds after a while the other thing we would do is if anybody ever wanted to have a 99 hour stream uh this would get messed up because it does cap at two digits so 99 hours 99 minutes 99 seconds that's the highest amount of time I don't know what it would do after that it would probably wrap and start showing zero somewhere or maybe keep showing nines and not count up I don't actually know what it would do um I don't plan to stream for 99 hours straight though so hopefully it won't matter uh there is a slight difference cur time and current time let's fix that up okay so the start button is basically the same whenever we press the start button we just set the start time send button it's gonna be the different one and basically what we do is just the same thing from the macropad we no longer need to generate this instead we just grab it from the label send it out the keyboard which is under a different name keyboard keyboard okay that might be all we need let's see am I forgetting something oh oh by the way I forgot to I forgot to call it out when we started but I know somebody see Grover I think somebody said something about it um check out this amazing artwork this is so awesome um yeah let me open this up let's go here a box isn't this amazing look at this the new title card uh Bruce Bruce from the discord and who works at Adafruit drew this up so this is freaking awesome I cannot I cannot even put into words all the way how amazing I think this is to be honest with you I kind of like I had this idea for the submarine picture with the with the Cyclops and Blinka peeking through the windows um and that I just kind of gave that idea I put that idea out there and Bruce came up with this whole this whole card which like honestly is more clearly than I could even see it in my own mind like it's amazing to me how well he got the exact thing that I wanted even when I didn't even know what the exact thing I wanted was beyond just that basic description of the submarine with the with the windows uh in Blinka so this is awesome thank you huge thank you to Bruce hug report definitely I'll be putting that in the meeting uh for this week who is Tim I am Tim um yeah yeah thank you Ham's lab for sure definitely huge huge hug reports and thank you to Bruce uh okay I had to I had to drop that because I was like super stoked about that thing I that just got made up yesterday so um this is the first time we've used it let's see here Ham's lab says we could use NTP to keep an offset between current time and real time which would fix the drift that's true um I think Tix does something like that Tix has a way the library Adafruit Tix has a way to manage it already um I don't know what it is it might be different per device to actually often turn off auto reload because I save so often and use control cd and the rebel interesting I uh I basically turn my turn my auto save in my editor off and then I have just gotten used to control s so like I don't save as much but I do use the save to like rerun yeah totally agreed thank you to everybody for the love of the title card um Bruce yeah foamy guy is Tim doesn't sound right it is right though Bruce uh I don't know exactly Bruce's name on discord oh oh it's a different Bruce maybe I had misunderstood which Bruce it was I think I mentioned that Bruce was on discord because I thought that that was but I guess I could be incorrect actually maybe I had the wrong Bruce um the way that I communicated with them was through email with pt and then also through base camp um so I probably shouldn't have said I probably shouldn't have said discord out of turn I assume that that was the case but it looks like I was wrong maybe often set the script to exit when I press the any key oh yeah how do you do that one oh just like input or or uh catch keyboard keyboard exception how do you do how do you do that Dexter um okay get the camera I got excited I was going for the camera and I remembered suddenly the title card that's where I was at through the camera okay so we're not quite done maybe we didn't call display show hmm okay we did call display show did we have an error ah no module h id okay easy enough oh let me update my feather as well if I get crashed again uh led animation let me update my feather and then we'll keep installing libraries actually I already have a door open here I guess it's like uh the order matters or maybe uppercase matters I don't know show up let's grab that download it yep and let's see super is it two double reset or do I need to use boot nope we got it nice I really love these ones it's not shown on the camera I guess you can't see it I really love the ones that have the screen take over um I hope that that is kind of like the standard for devices with screens nowadays here go feather boot here's this grab our download there it is put that in there uh oh okay runtime dot serial bytes available I have used that before I used it for um kind of like a command command runner script I'd had a for some of the installs I've done at work I did a basic app where like stuff comes in over USB serial uh and the circuit python device like reacts to the commands that come in so it'll say like you know fade the red led up or something a command will basically say that and then the microcontroller will do it and that I think is the check we use to know when a command has come in nice I hadn't I never thought about using it as a uh as a way to break out of the script though that's actually that's a pretty clever way to use that I like that thanks for sharing um all right so we needed uh led animation next I think there we go okay so we can make some visual changes let's see if it's actually working though so um it's in this okay this is the docs that's fine let's make a new one of these they're covered up too much yeah kind of why don't we switch them around the other way okay so I think red and I have a backwards and a backwards green green starts red stamps like we got an error though and saying something none type float and supported operations for sub and float so we tried to subtract float from none or vice versa 83 uh okay so we put this to current time current time is none ah yeah yeah we never set current time to now we need to do that oops see if I get used to clicking the right one of these browsers by the end of the stream go for the right one okay green button to start counting goes and somewhere where you can paste boom perfect okay so yeah let's make it bigger and centered so for bigger we can just use scale on the label already scale too we could even maybe go at least three we might be able to fit four um for location let's put it in the center so instead of y let's go anchor point equals tuple 0.5 0.5 label anchor position this one will be display dot width over two display dot height over two here we go um yeah I think I think we probably have room for even bumping it up by another multiple we might as well make it as big as we can I don't really have any plans to do anything else on the screen so and I don't know we still have plenty of room when it looks like this but I don't know we might be getting close to out of room when it starts including the hours right now we're under the first hour so it's not actually including the hours I'm honest with you I'm not sure the hours work on the display either let's see uh let's test it out by just cheating the how did I do this I think I yeah I think I just cheated here add an hour artificially of course we'll take this back out when we run it I mean when we're done but this shows us uh what we can expect when we have the hours in there it's looking pretty good I feel like it's no longer centered maybe I'm misjudging where the screen is that or maybe the centering doesn't work how I thought it's almost like it's centered based on this width but then never centered again when it went up to larger hmm this is not the solution but this will tell me if that's actually what happened is that just having the hours is what's making it off-center is if it's centered when we do it this way no okay I'm not sure why it doesn't center it's pretty close maybe I'm just misjudging the size of the screen whoa hey do you do that cat's hissing at something outside the amazon van natural cat predator is there a way to manage circuit python library bores in vs code like circuit does I don't have much experience with vs code I think there is a plugin for vs code that's made for working with circuit python stuff I do not know what that plugin offers whether library management is one of the things or not if it were me I mean the way I manage it you can see in pycharm is I basically just use the terminal instead of like having pycharm be aware of you know libraries and stuff like that instead I just it has a terminal inside of it and it has tabs so I can have as many terminal tabs as I want and I just use circuit from inside there how's it going Scott let me catch up a little bit too on the YouTube chat I'm trying to think of it right some paper yeah ignore cura cura cura does have a weird interaction with circuit python doesn't it I remember discovering that at work we had a low spot to use low spot cura one day we try to use it to load circuit python devices or something and everything was behaving all weird so I don't know why that's not centered it's close enough though honestly I mean it's not like I don't know it's a couple more pixels to the right really is what I was expecting but it's close enough the right maybe there's an extra space or something that's throwing it off I don't know it's not too big of a deal though because it is all on the screen and we're never gonna I don't anticipate at least we would ever add another digit anywhere so we should always be on the screen when it's the size we don't need to make it smaller in order to make room so I'll leave it like this let me take out my little cheater hour that I put in to test it here nope nope nope where was it right here just back from lunch nice get some yummy lunch down all right so yeah I think we're pretty much there right if I don't check it again so to start with we have no fading we just have both lights on we press the start button which is teal that begins the fading and it also begins the count up and we can paste with the red button and it pastes the current value so we're looking good so I think we are good here you know I was thinking this was gonna be fairly hey buddy come on I was thinking this was gonna be fairly easy I may have to step away for just a minute to break up a cat fight we'll see hopefully hopefully cats are gonna behave themselves if not then I'll be right back um let me put this I think in a new file inside of the I'm stamper repo uh Gordy G how's it going one is narrower than the other digits um that could be yeah I don't know terminal IO is it mono font mono space um I think you're right yeah I don't I don't think it is I the default font I don't I don't think is mono space I think it is different it should though I thought account for that I thought it should um I thought the way the anchored point and anchor position worked allowed it to count for that to account for that relived cat fight but luckily we avoided the worst of it maybe it's something to do with scale I do think there was a bug for a while with scale and anchor point and anchor position and it seems correct at first but we are on like sit gale four if we were off by a couple of pixels it would be a lot more pronounced at scale four if it gets multiplied out um I don't know it could also just be miss misjudging the the size of the screen I didn't draw anything on the entire screen so I don't actually know where the bounds are I assume it's kind of this rectangle that's sort of litten lit up but some screens do have like a little bit of extra space that sometimes looks like part of the screen but is actually not which would then make things look not centered necessarily yeah scale is throwing off it's possible yeah see grubber I think uh I think that's possibly one of the issues oh terminal IO maybe is mono space anecdote of thanks uh yeah thanks tim gotta run friends band is playing down the street awesome yeah nice enjoy uh enjoy the blues and bourbon that sounds like a good night thanks for stopping by um all right so we're gonna go put this in the repo I think we'll just make a new folder and we'll call this neo key feather wing tft feather codepie and if anybody wants to add ports of this project to the repo um please feel free like totally you can make a pr if you want to add like david if you're interested you can add your clue one um if anybody else wants to make another another form factor I kind of am just keeping this repo to collect a bunch of different ones honestly I think it might be an interesting project to just try implementing on different devices um as just kind of practice as working on all of them eventually maybe we could write code that's um carry over a bowl uh cross compatible or something um you cannot see the discord numbers one second okay we owe terminal yeah that's a good one just started looking at it yeah that'd be awesome that one's cool because it has I think that little joystick thing I think the button is like a joystick which is interesting uh pipe portal would be another good one I'm always working on pipe portals you have a touch screen interface one circuit non sequitur when is a good time to ask anytime yeah throw out your questions anytime uh or I guess if you're trying to ask scott specifically maybe that's up to him if you're trying to ask me or you know either way I'll do my best to answer if I can um I would say throw out questions anytime I will do my best to keep an eye on the chats and answer what I can I'm liking the s3 box now to see what did I miss here oh s3 box maybe that's the new uh the new s3 device the one with the screen I think that k-match has been working on maybe yes scale works uh in the entire bitmap object anchor is a font pixel base all right uh so vector vector IO this is the the next thing we got this knocked out that's awesome we can close this we can close this we'll keep my device window because I'm going to keep working on one of these I may run and grab a pipe portal actually I don't I didn't get the pipe portal before I started maybe I'll grab that for now I guess let's just stay on the I might as well just stay on the feather tft for a bit and then we'll switch to the pipe portal if we need to okay so vector IO uh let me make a new timestamp vector IO intro vector IO so for folks that don't know this is a feature that is inside the circuit python core and it's kind of like the display shapes library but it's built into the core so you don't need to add a library to use it it's not the exact same there are different features in display shapes than there are vector IO but they're similar uh and vector IO being inside the core ends up taking less memory for your shapes I think I don't actually know I've not done like profiling or anything like this um so I could be wrong but that's my understanding is that vector IO because it's not holding a bitmap that is the size of the shape um you know that's a thing that doesn't need to go into memory when we use vector IO so the docs for it are right here if you go the docs and search vector IO where there it is okay vector I don't know if I've ever seen this page in the like tablet size here where it's shrunk me down for responsive yep yep oh okay oh I do remember seeing this one actually let me pull this up over here yeah I should pick up one of these this does seem like a nice device are those cameras on the front what are those maybe we're like uh maybe it's light sensor or something I like it's a little stand too where I go next work down here okay oh interesting oh okay so the board the two parts so there's one board running this way and then the display it looks like plugs in on the top down here interesting oh this is such a small touch but I actually really like the fact that there are mount mount things on this this goes a long way towards making stuff usable in like other projects um my main the the main focus of my job that's not ate a fruit the job that I work Thursday through or Tuesday through Thursday Tuesday through Friday is digital signage and one of the things we circle back around to every few years is digital price tags um this form factor would make a pretty good digital price tag and the fact that it has these mounts on the back uh does let's see where were they on the back here okay but these are for the display I see you could maybe reuse the display yeah it does not work quite how is it thinking but because the display has those you could actually make a different stand if you want the stand to be a different angle or if you want to mount this thing blush on a shelf or something interesting device I should pick up one of these okay um yeah I didn't take a time to time stamp for our detour let me uh check back to the chat as well Gordy G uh nope hasn't asked anything but yeah I need to I don't remember if I said I think I did maybe not I don't remember for sure but anytime throw out questions um about circle or anything else you can throw them out anytime um the board in the stand is done okay the one that's inside the stand doesn't actually do much the one that's inside the little screen boxes where all the brain is at um okay so vector IO there's some basic examples here and I have started working on a few other examples that are I think over in circuit python org but I will say there's not a ton of examples for vector IO so one of the things that's on my sort of like mental list of things I am going to do at some point is like more vector IO examples I figured it would be good to do a basic overview of what vector IO is and how you can use it in a video form just to get more folks aware of its existence and using it so right now vector IO supports three types of shapes there's circle rectangle and then the most flexible is polygon which you can pass a list of points um it just moves the connectors I see Gordy G says is there a way to point circuit at a circuit python device which has had its name changed yeah definitely uh well I say definitely I can't say that I've done it before but I'm pretty sure the way that I'm using it right now in fact so um back in my terminal so this command I ran right here um circuit and then use the argument path and then you give the path to your device um so you should be able to find your device no matter what its name is uh if you left the name by default then it will be circuit pi if you just have a single one or it just starts counting up if you have multiples um but whatever the name is even if you renamed it something custom you should still be able to put the path to it so if you're on linux uh or maybe mac your path will look something like this media username and then whatever the name of your device is if you're on windows then the path would be like you know the you know d drive or f drive or whatever drive that it shows up as so I assume it would be like you know d colon slash or something like that um if you're on windows so yeah this path though I think you can use to target your device no matter what the name is let me check this uh this core thing okay um all right so vector IO gives us the ability to draw these basic shapes circle rectangle and polygon and then add them to the display and use them just like any other display IO objects so I'm gonna copy paste this we're gonna do some some basic like what is vector IO how do you use a type thing and then I'm gonna dive into the core code on it so this is um time stamper 50 feather mint uh linux mint I guess you mean probably in which case yours will be similar to mine so like slash media username probably should be where it's at um although I don't I haven't used meant specifically for a while I don't know I assume it's probably the same um but I'm not positive all right code we'll delete that yeah for sure save this and so the examples here go this we'll need a little more setup won't we let's say core board core display IO um what else vector IO I guess yeah that might be all we need so this makes a palette and then we make a shape so we can either make a circle or a rectangle or a polygon I'll do a circle first uh let's do x y a little different maybe just 10 10 for now group append I'm gonna call this main group refactor display Debian similar to Ubuntu yeah okay my uh os is based on Ubuntu as well so I would think it'll be the same for you slash media username and then whatever um so there's our display we have a group we added the circle to the group so display oops display dot show main group and then just wow true that might be all we need let's uh let's see so one thing I'll do is uh why don't I take the um when I take the feather wing off well we don't have the bright lights and the keys getting in the way here all right so we got our circle drawn one thing you can tell right away is it is partway off the screen um so let's fix that and that's because the circles are anchored to the middle so whatever we give it for x y right here that's going to be the center of the circle uh we gave it 10 10 but our circle has radius 25 so um you know we're we're partway off the screen but we can move it just by giving it a different x y so let's give it what would we would need to give it um like us 25 would put us at exactly the corner and then anything bigger than 25 would move it further out um you can also do like basic animation type stuff right so you can do something like this uh for i in range well let's call it x so let's say um the range of display width minus uh 25 and then we can go circle dot x equals x time dot sleep maybe like this and then go back the other way for x in range we're going to count down this time so this comma minus one no comma zero comma minus one then the same stuff so this will make the circle go back and forth a little bit slower than i want really though let's speed it up some there we go so my my left side is not quite right it's bouncing off the it's bouncing off the left edge i guess because i'm not stopping at zero i shouldn't be this should be um 25 please show us how to find the path in circuit um so you would not find the path in circuit um you will find it you'll have to find it on on your computer like inside your file explorer but if you do like like scott mentioned there if you tell us your os um we can help you try to find it if you're on something linuxy then maybe slash media slash username like whatever your username is mines tim c so that's what my folder's in if you're on windows then it should be just a drive letter like f or g or whatever um i don't know we're still going a little bit oh because we're starting at zero yeah yeah this starts at zero so i guess we would want um we would want 25 here and then count up to that um gordy g says linux meant 20 but oh i think scott was uh asking axel though ask all axel was asking about where to find it are you having trouble to find it to um 40 or were you able to find yours all right so yeah we got a basic circle it's bouncing back and forth um this is pretty cool you could see you know like the beginnings of pong here if you wanted to implement a pong game you could do it using vector io um with the ball bouncing back and forth and then we could add a couple rectangles for paddles uh we probably would make the ball smaller uh if we're going to be on a screen this size um and then of course you know we'd need a way to control the paddles and all that stuff but um that's the that's the basic circle um to make a rectangle it's pretty much the same stuff rectangle doesn't get a radius but instead it gets uh probably a width and a height i'm guessing and remember off the top of my head though so let's take a look uh yep width and height and then x and y which you already have so for width and height let's do um 50 because that will match our circle i'll just change all those real quick there we go now we have a rectangle instead of a circle although uh the rectangle is anchored differently the rectangle is anchored at zero zero in the top left corner whereas the circle is anchored in the middle um so we'd actually have to do a little more math if we wanted it to bounce on the edge like the circle was uh gordy g you found yours uh missed the ad no worries uh good afternoon tim and i'll present you how's it going paul uh thanks for tuning in on the on the youtube over there um all right so this is kind of how you can draw stuff basically with vector i o um the circle or rather the color i should say is controlled by the palette um and the color of things is what i'm interested in tinkering with so um what i'm gonna do is first start by trying to make sure i understand how vector i o code works and and we're gonna open up circuit python oh yeah we could take this window i'm gonna go to main get a fruit main cool yep so basically what i want to be able to do is change the color right now if you have a palette that's multiple colors like let's say we had a two color palette and we put one to like i don't know redder have more red in it and we save this we will still get a blue shape blueish doesn't change the color to red and so right now like the vector i o shapes they all take the zero with index color they take the you know the first color that's in the palette and that's the color that the shape ends up being um but we do pass it the entire i just changed that around we do pass at the entire palette so it has the rest of the colors as well we just need to tell it to use a different index so i think what i want to be able to do is like when you create the shape here i think i want to be able to go like uh palette index or something like this and you could give it one and then it would end up using this color because that matches the one index we passed it there of course right now this doesn't do anything probably crashes because we gave it a you know an argument that it doesn't know about um but that's what i would like to do ultimately is have the way where the user can set the index in here and then it will reference that color from the palette and maybe even after the fact maybe you could even do like this palette index equals you know one out here as a property this would be really cool as well as if you could update it after the fact that way you could change it um you know after you've already drawn at one color you could change it to another color um so that's kind of what i want to implement and it will require some tinkering inside the core like we're still pulling maybe or scanning after we pulled we have just finished what's the advantage of passing the palette versus a single color value um well in the case of the the feature i'm trying to add the um the advantage becomes like having the extra colors if if uh for instance you know if this took like color and it was just like well it wouldn't be a string i guess but you know if this took color like this then it would be a lot harder for us to go and try to give it an extra color i guess we could update the color itself but um my understanding is like internally everything in display oh wants to map to a palette so even if we were passing in a color like this internally inside rectangle it would ultimately be making a palette setting this color into the palette and then referencing it from the palette um so you know maybe there's a case to be made it simpler if we just pass in a single color instead of the full palette but i think that's the reason why is just a palette's gonna get used no matter what and um when i think maybe kenny is the person's name i'm not a hundred percent positive so i should use their handle which i do know which is um worrier of wire uh is the name of the person on discord that made vector i o um and so yeah my guess is they just kind of chose to do the palette i don't know necessarily the full rationale behind it um hopefully this is enough i think to be able to see the uh yeah see the end of the line there had it covered up by the youtube jet before um yeah that's my guess i'm not a hundred percent sure though you might try to catch a worrier wire if he's around some time and ask him about it um so jumping into the core i think we want to change this in third module so the first thing i'm gonna do is do a test and see if i actually understand how this code works inside so like let's go to rectangle and i think that here where this is returning one if it returned two instead then i think it would use the second thing in our palette which of course has the index one but there's a minus a minus one that's happening later to get it you know back to zero based so first thing i need to do is just make sure i actually understand how this works because this is my understanding now is that changing this to two here will make us use the second color in the palette um but i don't know it for a fact so we gotta try it out um so what do we need to do like um export we run it or shell or like um um source it but does that not want to autocomplete i guess that means we probably don't run it maybe we do source it yeah it looks like probably sources what we need um so now back to this i think this is our device so let's see if we get that built correctly yeah it's weird you specify only a single entry palette but there's no way to say which palette color to use and which one is transparent correct yeah well i mean transparent i think it just does any i don't think it i mean you could call like you still have the palette so you could still call make transparent um like we have this palette object we could still call like palette oops palette make transparent zero or something this would end up making our shape invisible um but we have no way to like switch it to from zero to one basically which is the part that i want to add which i think will be cool because then you could make one palette with like you know five colors and then make like five different shapes and tell each one of them to use a different color uh with today's api you'd have to make five palettes in that case you know five single color palettes each one with their own color and then you set each one on one of the shapes um but i think it'd be great if we could just take have one palette with all the colors and then you just give it the index for each one keep this up it'll take it a take it a minute to build it looks like we haven't crashed which makes me think i did do the export stuff right um oh i totally didn't take time stamp um let's say discussing proposed changes working on vector io changes all right and i'll mention again if anybody is interested in helping in the um chat the not the chat excuse me the document the note stock if anybody's interested in helping us do time stamps um definitely appreciated if not though no worries either uh oh let me also show you this while we're waiting okay we got the build actually i'll show you after i'll show you when we make the next build um so we got a firmware i'm gonna reboot to bootloader loader and then i'm gonna copy the firmware that we just made p build root feather cft firmware copy this let's look at todd bots while we're waiting on that to copy whoops i keep opening the wrong one nice you even have it looks like some uh y motion in there as well i had x only so this one it uh does this one do the angle uh like a diagonal bouncing be cool to figure out a way to have obs show the time on the stream that could be doable i mean if yeah obs it might have some default like template strings or something i know like the text that's in my obs scene like at the bottom there that says foamy guy and the discord url that's a text element or whatever um a text source i guess it would be maybe there's some like you know if you do dollar sign time or something maybe there's some like templated variable that you can put in there and obs knows to substitute the time although it would have to distinctify between like live time and recording time if nothing else though you could have like i could make a javascript page that does a very similar kind of counting um that this thing does and then we could pull that javascript in and give it a give it a transparent background and use it as a little counting clock thing that might be kind of uh complex and excessive for what we're trying to do but i think it would work kind of the same way like how um how the twitch um subscription notification works that's that twitch subscription thing it's technically a web um a web source item or whatever and it's just pointed to a certain url and there's some like transparent background thing going on so when it's when it's not splashing the thing up you just don't see it uh if you set a timer on the desktop you can use obs to add source in a small box oh that's true too yeah if you just run a timer yeah that'd be uh that'd be super easy yeah if you run any kind of timer you can just feed it in not as text but as a a window source or whatever that's a good point as well to Keith yeah uh and yeah dexter noticed as well the the box is pink it's a little tough maybe to it's a little washed out i should say coming through the the thing here i don't know somewhere i have um camera controls here we go i can turn this and then you can see the pink a little bit better but that did work how i wanted um so we now are instead of using the zero width index we're now using the one index which is this color so if we wanted it to be like green instead we could give it a bigger color for green lower color for red save it and now this box will be greenish instead of red or bluish so happy st patrick's day box is what we got here a day late but still green so that does work how i thought so now really all we need to do is make a new argument on the constructor uh make a new variable like internally on the object that stores the value that was passed in on the argument and then whenever we get to right here instead of just returning a hard coded number we return the variable from our object um that we set in the constructor so all that sounds fairly straightforward and i guess it probably is fairly straightforward but i will say like i don't have a lot of experience with it so um it may take me a bit and you'll have to bear with me a bit but it'll be a learning experience for all of us potentially so first let's look is there anything in here that we need to mess with no it doesn't look like it so shared bindings we probably want to go to because we're going to add a new argument let's do rectangle first we already have rectangle running we might as well do that oh indexed is this our sample oh yeah yeah this is the example like from the docs page oh this is polygon let me get rectangle whoops okay so it's been a little bit since i have dug into the core so the things we need to do are on the constructor interesting so one thing that i find odd here is this has width and height but not x and y but we do still pass x and y but where our code is like this so are we overriding is a thing or something how do we do this one okay this one does have some stuff in it draw protocol see any kind of x or y or anything though being here bubble's table i don't see anything here either hmm doesn't include vector shape does that come from vector shape here's our rectangle make new oh did my mouse just die mouse just died all right one second i gotta get a mouse battery mouse batteries they're pretty close though i'll be right back and then low on batteries gonna buy another pack of rechargeables maybe we go and we can move again so this one shows width and height the next and y here okay so maybe i was just looking at the wrong function that was like construct instead of make new which i think make new is is like this one goes for a knit when we call a knit in python code we are calling make new i think in the core let me get the chats back here it's mutable will be us time okay so that's a time stamper or something can the program edit the contents of the palette or is it immutable i see yes got mentioned that it is mutable you can't change it totally so you could like i'll show you a quick example of it as well we could say in here something like um let's see we could say like whenever we're going towards the right we want it to be blue so palette zero equals bluish zero x uh just something something bluish and then down here we could say we want it to be green when it's going back the other way so palette zero equals greenish uh really like this no i have done something wrong because it is staying green the whole time what did i do wrong maybe it doesn't work how i thought you definitely can change it in the palette oh oh oh i have hard coded it to point at one instead of zero yeah there we go yeah so now we have blue going to the right and green coming back to the left um so yeah we definitely definitely can change the uh the palette there you could scroll through wheel by changing the palette entry totally you could yeah yeah yeah yeah you could count up to 256 or whatever it called the color uh rainbow i o color wheel thing to get a color and then you could set the set the color based on that you're definitely good yep dexter wrong slot on the palette definitely right thank you so you folks can see this is my dear friend amanda singing inner partner look on the guitar nice is this the uh this is the the blues you're talking about i think was that ham's lab uh so here for this thank you tim yeah for sure how is confusing sometimes the palette is simply a list of available colors a theme sometimes it's a specific graphic sprite element colors one type is shared one type is specific to the sprite yeah that's true sometimes it's color converter instead of palette color color converter behaves like a palette but it's a little bit different um but they are kind of used interchangeably this is awesome looks like a fun time down at the old uh down at the old concert hall or wherever we're at here palette zero yep color wheel oh on time dot monotonic oh that would be fun let's do that some rainbow action going on here so let's do it uh let's do it on every update there we go that's pretty slick yeah color i o wheel there's so many things you can get colors for that i don't think of like leds whenever i think color i o or well it's not color i o is it's rainbow i o but whenever i think of this color wheel thing i think of leds but the truth is we can actually use it for quite a bit on display stuff too now we have like this rainbow chameleon box bouncing around which is pretty sweet we could turn it into the dvd logo and then we could dvd logo bounce it around that would be fun i guess if we wanted to use vector i o though we'd be using polygon and we would have a ton of points in order to try to make text yeah gordy g also mentioned palette one i uh i switched the hard coded there and then i got tripped up by using zero um okay let's head back to our core code so let's go arg uh palette or let's say color color index color index this is a int i guess it is i'm not actually sure though um or else would we take a color we have tools well now this takes ints oh well yeah it's not going to be an int though it's going to be a color it's because it's an index not actually a color it's the index in the palette the palette holds the color so yeah we'll just be an an int um i guess kind of the same as height and width are and required uh no i don't think it should be required really i guess we want to duplicate more like this one because we don't it shouldn't be required and it should just default to zero same behavior as today the real version of today not my special version that's using one uh yes yeah there is a deep divers role i think um i don't think i have the ability to ping it unless anything changed it has a space in it it's we it's a little bit different than the rest of the roles um what's going on uh who's gonna be the first one to write svg to a vector i o polygon converter oh that would actually be really sweet i don't it'd be tough for us to do it in the microcontroller because svg is um is xml and we don't have an xml parser yet i guess we could write one but maybe in python in route raw python maybe there's one that works but um you could maybe have like an intermediate areas do you like a converter script that runs on the pc it consumes an svg and it spits out a you know vector i o json or something that is basically just a list of points that you can feed to a polygon or maybe it could even spit out the code for um for the exact list that you pass into polygon and you could just copy paste it from there it'd be pretty cool do these need to be in order i don't actually know let's go ahead and keep the right order though just in case so that will default to zero person args vector shape parts okay so i think we would do kind of the same thing here color index color index you hint then we would be passing that along here which this would be the one inside of shared module maybe not not a not called make new right vector shape make new oh vector shape make new vector shape so yeah actually i don't i don't think we need to pass it to there um vector shape is like an internal object so um technically in order to draw it on the screen you need the rectangle object and then internally it also makes a vector shape object and it uses the two together to draw it on the display but i think we don't want to touch the vector shape we want to do everything on the rectangle if i understood some guidance i got from warrior of wire this morning so there we go this calls construct here that's actually where we would so we want to take this actually here pass it in here so now rectangle construct this is in oops i just closed it this is in shared module right here this will now be a i guess the same thing you went the color index order has to just match the enum on the top i think okay talking about the order of the arguments yeah it spits out it's out circuit python code that runs on the pc yeah yeah i think that'd be awesome to con to run it on the pc consume an svg and then make a vector i o uh object that'd be sweet i am definitely down for that so this i think we do something like this now self basically gonna make a new variable on the object okay and then here we go self and access it okay so i am almost positive there will be some reason why i've done this wrong either it doesn't build or it doesn't work or something but let's give it a try this might be interesting for someone in the future uh there's a very cool vector image format useful no vector image format that is used for storing icons on the haiku os interesting take a look at that i have another nifty thing to show as well don't do while we're waiting on this build a coup vector icon format oh wow small as heck isn't it so 7000 bytes goes down to 700 almost a factor of 10 iconomatic you know what the type of i mean i'm sure it says somewhere on this page oh okay looks like binary data in the file the file is not like text readable is it it's not like xml or json or any it must not be right otherwise it couldn't be so small looks like this is probably the technical format like which chunks of the data have which things inside of it interesting you know what this reminds me of is message pack it's almost like message pack for svg text it's like packing it into specific kind of bytes and stuff that's pretty cool i never knew about that format i think you can add j cores oh that's true yeah i think i have done that before make it build faster that's true i think that is true i think i've done that before uh davo desuga hit the hey now thanks to him good night all yeah thanks for watching and good night dave um axel says my titano doesn't like button 163 says incompatible 723 can i use circup to downgrade a version of a module uh i don't think you can use circup to downgrade well let me uh let me actually clarify i think you can use circup to install am i thinking of circup no no i'm thinking of totally something different yeah no i i think circup always installs the latest released version i don't think the circup the best of my knowledge it doesn't have a way to install anything other than the latest release version so if you want to install an older one i think you'll have to grab it from the github uh assets like in the release okay yeah we did crash here so let's see too many arguments so yeah probably we need to fix that in h also ooh nope uh hmm maybe in h over here yes um so do we go here j like eight or something uh maybe i shouldn't do so many computer is doing kind of a lot right between the recording and the streaming and well it's not recording i guess but streaming and it's playing the preview back in obs and somewhere inside of a youtube window and somewhere inside of a re-stream window it's probably playing the same stream back a couple of times so let's see what we got here we got a semicolon maybe shared module um yeah it looks like i missed a semicolon rectangle t has no member named color index how do we make it so it does maybe that's where we need to change something in h would it be student we did it say uint32 somewhere else uint32 you know it's interesting though this says uint32 for width and height but then here it says uint16 for width and height or why those are different it has not crashed as fast so maybe we're finally through the uh syntax errors oh wow that went so much faster 23 seconds that built in that was way faster i wonder if there's a way can you like override the make command to like always add that in even if i don't use it normally like if i don't type it i want it to just do j4 anyway uh let's go to bootloader the other thing of course like i'll put this in the doc string as well right now we've done the code but not the doc string seems as though we broke something because now we have no box look like a reset i think my default should have been one not zero yeah so it's not crashing that's actually that's a good sign that's a good sign i think that here okay well one thing is i also this should be this should be color index and i think this should be one not zero it was returning one before which ultimately maps to the zero with index in the palette so it's like on one side it's zero based on one side it's one based but i will also need to add this thing won't i imp yeah so this this will need to be done as well i don't know if that's the right thing to put here alias make make j4 but it's danger sec let's try this build if we at least go back to visible then we know that our problem was being off by one i suspect it's still not gonna work when we actually try to pass in this new argument probably missing some more stuff still especially like not sure what this object is but i don't think i declared it anywhere i guess this one's not declared anywhere either though at least not in this file quite as fast this time the object doesn't exist undeclared so where did this come from we're in shared bindings see not here these are defining functions like get with set with not with the object this is where we'll need to add it to the dock strings hmm let's turn this off for now let's see if that works i think that's for properties though right because this says functions properties so maybe this is only if we want to have the uh oh i just turned the wrong one off maybe this is uh only if we want the property to work we need to have this code here and then we'll have to figure out where this comes from gonna fail again there's only like 20 seconds 20 23 or 26 seconds last time it succeeded understand see feels like it's been longer already well like it was longer last time too but it then it ended up failing let's work in let's see oh nope succeeded okay back to boot loader crouching vector hidden box latesting kung fu drawing capabilities hmm oh yeah now it's working this part defaulting to zero what if we pass it the new one though does it still work so can we say now color index one no two so this is gonna be weird though if it's one based internally and zero based on the palette are we gonna have the user pass the one based one or the zero based one this did work though or do i i still have the code yeah never mind i still have the chameleon code running let's take the chameleon code out oh wait a minute no that that proves it this proves it is working because now it's pointed at index one instead of index zero previously it was pointed at index zero which was just blue and was not changing but i do think this is actually working we get green by itself and if we do do one which would be the default we get blue yes okay that's pretty sweet so let's see properties we're not ready for yet here should have probably just duplicated i almost don't want to call it index because the index kind of implies to me zero based but i also don't really want to just call it color because then it seems like you would pass it a hex color like 0x ff 000 or whatever so i guess we could call it color number which is not index and doesn't imply zero based as much but it is kind of arbitrary i'll table it for now let's let's think about it palette index i look i mean i like that too but it still has the same kind of crux of the issue index implies zero based and the palette is zero based but the number we're giving it here is one based so it's almost like it'll be higher than the index by one i do kind of like palette instead of color though so if it was palette index instead of color index i think that'd be a little bit better but it does i'm i still don't know for sure i wonder if there's something better that doesn't use index or maybe we should make it zero based but i think the reason why it's one based is because it uses zero differently i think internal to vector shape it uses zero to signify transparent basically so one becomes the zero with color in the palette and zero becomes transparent or not drawn at all at least something like number instead of index yeah palette one dex hillan i do kind of like one dex i've never seen that used before but that does this crack me up a little bit actually one dex how do we make our property work i guess this where with the object okay oh no no no this is get with the object though and this is not this has no get so this is a different thing where does this come from okay okay so we declare this thing it's a property type we give it a getter and a setter i don't know what the last thing is i mean it's none but that's default or something i don't know what it would be so basically take like all of this code for width down here our index let's go ahead and make the change to color number i think maybe you just pass in a palette and if index zero is transparent great otherwise block block is color colored or in being the shape color i think that that is possible but would require more substantial changes inside of the vector shape which i don't necessarily think i'm probably capable of doing about more help from warrior voyeur because it treats zero especially it has like a special case for zero where it does it like just doesn't draw the pixel at all it's basically like if it's going to be a zero then just skip it don't draw it at all so we'd have to change that logic to not not do that anymore and instead zero would just draw zero and then the it would get made transparent and that would have the same effect visually but functional out functionality wise would be different color number of the rectangle in one based index of the palette so then basically we have get color number okay i think a palette is confusing still a vector ish shape can only show a single color that's true yet we'll still only show a single color but you'll be able to change which color within the palette which kind of makes having the whole palette less confusing to me i guess like the fact that we'll be able to change our index within the palette kind of wraps back around and gives us a reason to have the whole palette whereas the current api we give it a palette but we're only ever looking at the first thing in it we never do anything else with it and so it does make less sense today i think but once we have the ability to change i kind of swing back around to the other way we're having the whole palette makes sense um okay so does that everything we need for this because we still have not actually declared that thing okay i didn't copy enough because i don't have this part of the code now that exists okay while this is running let me show you this this is amazing seagrover is in the chat seagrover is who made this and shared it with me so this uh a few weeks back maybe like a month month and a half for two months ago i was working on the nico cat animation um with this cute little animated kitty seagrover extended the the application to have multiple cats so we have like i think there's five or six in here and they all run around all on the screen at once and they're all different colors which is amazing i kind of want to go back and add the extra cats into the one that's in the learn guide so that it can have multiples um seagrover was talking about some other enhancements too like whoops whoa geez crazy fractals um seagrover was talking about adding some other stuff as well like collision detection and stuff so they wouldn't run on top of each other maybe they would bump into each other and stuff um but this is so cute i know whenever i made this i only ever implemented it with one cat i made it as an object where it turned out to be fairly easy to add extras um but i never even considered it i never even thought of the idea of adding extras so this is this is super awesome i kind of want to go back and put it in the uh put it in the guide this way if a vector ioshape had an outline as well as a fill then a palette makes sense yeah i would like outlines honestly i think what would be cool one of these days is to make a python layer over the top of vector io that basically takes the api from display shapes the library that uses bitmap shapes and uses that same api but implements it under the hood with vector io so so to make a rectangle with a border for instance it would probably make two rectangles one for the inside one for the border um yeah by itself vector io doesn't support the outline being separate um it would be cool though if it did in which case yeah it would kind of make more sense to have a palette if it did use both you kind of agree with that yeah that's true one cat is an awful lot one cat is an awful lot i'll say and two cats is also an awful lot six cats on the screen six virtual cats is amazing six actual cats is a handful um how's it going uh norman uh over in the youtube chat and andrew read as well clear val i don't know what you were saying with clear val maybe the part of my code had clear val in it or something i'm not sure but how's it going thanks for hanging out in the chat with us by the way you can sort the group by the y coordinate of the sprite oh really oh i see yeah just move which one so you change the z index based on the y index that way the ones lower in the y would show up on top that would be interesting good idea um okay what is our problem here nested something something what is this maybe i don't know did i mean i don't really know what i meant we need these i think anything else midnight in sweden good night good night axle thanks for tuning in okay uh we're right about two hours i'm gonna keep going for a little bit though because i want to see if i can get this working uh if if we end up having too much trouble eventually i'll call it um deep dive generally with scott always went right around two hours sometimes i go right or uh you know sometimes i go a little bit more than two hours i'll probably it's probably pretty infrequent that i'll go longer than three hours for deep dive on friday so um anywhere from about two to three i kind of just go until i feel like stopping with whatever i'm working on so undefined reference to set color undefined reference to get color so i need these in shared module also oh color vow i see indra reed suggestion for the color uh variable color vow i'm with you value i do i do kind of like value we may end up changing its value instead of number we'll see midnight in germany as well norman bill says yeah thank you all for hanging out even though it's super duper late where you're at if you're interested folks that are in like sweden and germany uh and it's midnight where you're at right now um tomorrow morning so pretty much uh about 16 hours from right now is that right six hours from now is midnight my time 10 hours after that is when i start yeah about 16 hours from right now which is 10 am central time sorry i don't know what it is in utc off the top of my head or germany or anything else but 16 hours roughly from right now um i'll be starting up my stream tomorrow morning so if you want to tune in at a time that's not quite so late for you all over in europe uh you can tune into that stream i work on similar kind of stuff as what i'm doing here so um similar kind of similar kind of deal if you want a one that's at a different time let's get color number making it dirty i guess in case if you change the width okay i guess yeah if you change the width then you want it to be dirty because you need it to redraw which is pretty much the same with the color number honestly we want it to redraw so we'll make it dirty dirty is like uh display ios way of saying that it needs to be redrawn 1600 hour c et i appreciate that and paul uh shulanik i think also said plus five which i think is the probably the utc offset from what i just mentioned a minute ago right after the f1 f1 races they're races tomorrow okay do we need anything else i'm utc gmt and the time is 2300 at 09 i see let's see does this build now uh did we just forget a return no we have a return oh didn't change the argument here we go english crossed no color number undeclared oh i didn't save it still no uh different error though let's see um well sort of different number third module rectangle index oh is it still called color index on the object maybe yeah change that to the number because we changed it to color number instead of color index still no f1 qualifiers is tomorrow the race is sunday nice qualifying f1 index has no member named so i there must still be somewhere i need to add to change this um yeah right here okay and um let me start this one i tried to hold out but i'm not gonna make it i'm gonna have to run to the restroom real fast so i'm gonna start this building and then run and then i'll come back in just a minute already failed but and we're back so we didn't we still didn't build let's see uh color wow we still i'm not safe i didn't save again pull me once okay yeah looks like i just didn't save bummer oh well mods are away plus circuit python cats circuit python cats are always allowed mods or no mods okay we gotta build so now does it actually work there's kind of a lot of stuff you have to set up for properties there's way fewer things for the argument in the constructor than there are for the properties also did i change the name of the thing in the constructor let's see yeah looks like it here and here so it'd be changed i think okay so let's try running this one so go to bootloader nope missed it copy copy copy copy copy thank you norman welcome back get it all right and so by default it won't really do anything different or okay well it'll crash because i still have color index in my code but even when i fixed that it won't really do anything different because i haven't uh added the property that's trying to change okay so this works fine still well let me try this also though let's do two indeed so we got to green should probably use a more defined like a less bright green it's a little washed out but can kind of tell the difference and so then now can we change it this way so let's say we do like here rectangle color number one rectangle color number two oops that is awesome and let's do accessing also just for prove this this works as well so print rectangle color number and then after this one too so it'll print one the first time into the second time and then just go back and forth yeah nice okay so i think i have the process that was a lot of stuff we had to do and then we did it only for rectangle so we still would want to do polygon and circle but the good news is i think it's gonna be basically the same changes that i made for rectangle are gonna apply for circle and polygon as well i don't think it will be really that much different i'll need to go find all the different things that i changed and do all of them for those other objects but i don't think there should be anything like totally off the wall entirely different um let's take a quick look polygon i assume is like probably the weirder one of the two see if it has that same like get pixel and get area get pixel it does yeah zero there's a special case for when there's no points so is this um if this is true then return this else if it was false then return this so maybe this one right here this is where we would put our self arrow color number or get color number maybe i don't know if we need the property name or the get name or whatever but i think this would be the number we change to the one we look up let's take a peeking circle so this one would be here ethagoras smaller than radius i guess maybe also here too yeah i think so okay so it's a little bit different i chose the simplest one first it turns out rectangle was the simplest one because inside get pixel it just had basically it was like almost no logic right it was uh yeah here just the one of statement the one return this used to be hard coded to one and i changed it to the color number okay i think i know how it will work for the other two though all right i think i am gonna call it there it seems like a good stopping point because i got this working which is awesome i'm gonna push it i guess let's make a branch and push it um let's see i'll just do a new one of these i'll push this if anyone's interested obviously you can pull my pull my branch and play with it i'm not gonna pr it yet because i'm gonna wait until i have well first of all like all the dock strings updated i don't i think i did maybe the constructor but nothing else so we need to add the property dock strings or maybe i did i'm i don't know but we'll definitely double check them make sure all the dock strings are done and then do the circle and the polygon and then once all that is done i'll make a pr um but i will push now if anybody wants to mess with it in the interim so let's see what we have we have a foamy guy yeah get fetch foamy guy get check out new branch uh from ateafruit main no track um vector io color number i not intentionally changed that maybe that's a uh make sub module thing or something yeah let me try i gotta speak sub module or no what is it update make fetch maybe this will make those things not be changed i'm actually sure i still it's still i'm a little unclear on like when and how and why these update like occasionally i go to do a push like this and it has what i assume are differing git hashes here commit hashes but i don't know why they're different i don't know why it's like it it seems to think that i changed it it is when i do a push when i do a uh go to make a commit here yeah we went we went the wrong way we have a ton more now even we didn't not only did we not get rid of the two we had now we have a bunch more i don't know why it thinks these changed so basically this is python telling me that all these five all these ones are blue are the ones that have changes i don't know why i would be different though fetch sub modules maybe i should have done fetch sub modules on main maybe i should have done fetch sub modules on main i don't know can happen if you move branches without updating sub modules okay that problem basically a hundred percent sure has happened because i don't i usually run fetch sub modules whenever something doesn't seem to do what i think it's gonna do i should probably just run it every time i change branches then it sounds like anytime you change branches without updating sub modules okay but i think though the one of the nice things is pie term it can just uncheck all of these so i can commit only the changes i made in these four files which i'll double check over them real quick both to make sure i didn't change anything crazy and also just to give me a little refresher since i'm going to do circle and polygon i think tomorrow that was our constructor we could probably get rid of some of the white space i really need the white space that i added we'll just get status show good question probably don't use it as much as i should change is not staged for commit modified so these are the four that i did actually change intentionally at least and then this one i don't i didn't intentionally change it i don't know why though it's also not listening there was that whole big old list just a minute ago inside of this window surprised these are different honestly i don't know i don't have much experience whoops they're a little crazy there i don't have much experience using get status most of my get experience is like looking inside these windows and even that i don't not that much honestly i've gotten a lot better since i started messing around with circuit python i will tell you that but i still am not there's still some of this stuff like it doesn't necessarily make i don't know the full story behind it i know to look for patterns and i can kind of tell when it's messed up because it doesn't behave like i'm used to um i don't know the full like details behind why everything is the way it is and stuff like that probably don't need this either i don't have any extra spaces or anything anymore that's good let me catch up untracks could be could be if you are starting from an old branch which could be true i started from main but i don't know for sure if i pulled main when i started it could have been out of date definitely could have been out of date st driver stuff is a pain it changed from one sub module to many get status is most of your experience i should learn get status i kind of use pie charm gooey as my crutch with git like lots of stuff that i don't really understand i know the exact right hotkeys and things inside the pie charm gooey and i just do the same do it the same way every time whenever it's veers from that path i know something is is crazy or different but i should learn more of the why and part of that would be the command line i should learn to get status and the rest of the commands that go along with it truthfully this is nice it did actually um go to foamy guy which it doesn't always okay so that's pushed folks can play with it if you want i think what i'll do is tomorrow um i'll work on circle and polygon and maybe some other stuff i think i have prs and things i'm gonna look at tomorrow as well so if folks are interested again that's like um right now it's basically 15 and a half hours from right now 10 a.m central time tomorrow um if you come back to the same chat room the live broadcast chat i will be in there and i'll paste links and stuff it does go to a different it goes to my own twitch and my own youtube so it's on a different one like you can't just look on the same twitch or youtube you are today um but i'll post the links in that live broadcast chat when i get ready to start so hang out with me tomorrow if you're interested thank you to everyone who watched uh ask patrick w thank you as well uh to everyone else who watched and helped um thank you to all of you and yeah i will be back next week also at the same time so uh 2 p.m pacific is when i started today 2 p.m pacific every friday for deep dives um so i'll be back then and then uh tomorrow on my own channel but yeah thanks all