 Periscope or LinkedIn learning and you're wondering where the conversation is and who's this guy talking to? There's a good chance. I'm talking to the people over in discord or in the YouTube chat. That's where and Let's see any announcements and things One thing I want to mention is our jobs board. We have a jobs board right over there at jobs.atafruit.com And if you head over there, you can see open positions such as These there's a tech lead for Hack Club Bank There's a circuit Python programmer needed for some contract work in Buffalo, New York or it's remote work I think actually but you can check that out for more details And our job board is entirely free. It's free to post positions up there And it is free to look around and look for work It's also free to post your resume with your skills so that people may find you and Find a making connection of some kind. So that's our jobs board. It's right over there at jobs.atafruit.com Let's see one other thing I wanted to mention is aida box. So You can sign up now to get notified For or to subscribe to receive the winter aida box. It's going to be aida box 21 and as You may have noticed we've gone seasonal with these so we're not calling them a particular holiday Instead, it's a season and it also reflects the realities of the Sort of mushy or timelines on shipping and and receiving parts as we we put these together But I think we're looking at a January timeline. This is not going to be there before The the Christmas holiday season It'll be sometime after that. So we're thinking in January. Did I say July a moment ago? January January February somewhere in there. So winter Winter aida box if you head there you can subscribe you can also sign someone else up and these do sell out So if you're thinking you're interested in getting Whatever that hot new cool fun thing is going to be and all those great projects You'll be able to build with it then head on over there head to aida box.com or aida fruit.com slash aida box and sign up Let's see Other things to mention I've got a show I do on Tuesdays and This is the oh, so once there were no bleeps and bloops That's weird Thought I played some bleeps and bloops Sorry about that Sure, I did. I wonder why we didn't hear them. You can hear me, right? Listen here's some bleeps and bloops You heard those right Be good to know if that's still working. I hear them. I hear bleeps and bloops Also gave me a chance to get a delicious sip of water Let's see so I was talking about my show on Tuesdays, which is the JP's product pick of the week show and Each week I pick a product either something new or something special from our back catalog of great stuff And I feature it I go over how to use it and we take a look at the Learn guides that are associated with it or data sheets and there's always Almost always I think always a great discount with that product pick this past week goes 50% off of this most excellent latching relay feather wing And now I've got a little one-minute recap that I'd like to show you It is the latching mini relay feather wing They have a 24 volt power source that powers a Ring light the power comes from essentially the wall transformer to the feather wing and then when the feather wing is closed It will send that power along and over to the device if I press a That closes the relay and you can see the big glow on my face and then I can press a different button here to Change that state and like I said if we put this into the Latched closed position it is gonna stay there even if I kill power to this whole little setup, so I'm gonna yank the Power going to my feather that means that this is not energized It's not staying closed by virtue of a magnetic coil It's staying close because it has this little internal Mechanism a mechanical switch. It is the latching mini relay feather wing Yeah, that's right. So I know a bunch of people got those if leave we sold out So we'd love to hear what kind of projects people are using what kind of things people are putting together with those Also, there was a question in the chat last night during ask an engineer I don't know if it got answered because I wasn't able to finish watching through to the end of the show But someone asked about on the latching relay feather wing What happens if you basically tell it to open and close at the same time because it's two separate pins Who wins do the coils just fight what happens? So I'm curious if anyone tries that I sort of tried it and it seemed to get stuck a little so I think it's probably a terrible idea There's probably a chance you can break it or at least get the the switch kind of caught in the middle And then it might not want to return so I'm not saying to do it I probably wouldn't do it But if anyone is curious about doing an experiment on us on it, let us let us know what you come up with Let's see. Also I think it's time to jump into Circuit Python Parsec All right, let's get set up here for this one. This is a Cool one today. I think very useful one So for the circuit Python Parsec today, I wanted to talk about named keyword arguments for function parameters so these are kind of two names for the same thing either named arguments or keyword arguments and Let's give a little background on here. So in circuit Python and in regular Python We can have a function which is a little discrete chunk of code that we can define and then we can call it later when we need it And often there are parameters that that function can use to alter the behavior. You're asking for these are called the arguments So when we invoke this When we invoke this function, we can tell it to run a Particular set of arguments on the function. So if you look at my example here I have this breathe which is these LEDs these two LEDs new pixels actually that are pulsing sort of on and off and I'm using the defaults right now So one thing we can do is provide no arguments at all if we have built in some defaults Which I've done here so by default the maximum brightness is 128 and the speed that it takes to go up is about twice as Fast as it is to come back down and if I want to call that with arguments. I can just Run it like this. So here we see breathe. I'm going to change that maximum to 64 I'm going to change the speed up to point zero zero seven and the speed down to point zero zero five So I resave you'll see what that looks like and so we've now got a sort of faster pulse And it's not getting quite as bright now These are called positional arguments because the functions are in a particular order that is expected by the function So now let's take a look if we do a Set of named functions. It's a little more useful a little more helpful because it's almost like commenting your code Now I can call the function and say let's set the max to 32 the speed up the speed down to whatever those values are If I hit this you'll see it's going to save It's actually going to be a little faster because it's only going half as many steps now and it's not as bright And there's a couple other cool little features of using these named arguments if you look at this example It actually doesn't matter what order you put them in because the function can tell by their names where they go and how they're used So here I've placed that max value on the end and it's still going to work if we tried this with Positional things we'd be thrown weird numbers that we didn't expect And you can even pick and choose the ones that you want to send so in this final example I have here. I'm going to use whatever the defaults are by the function except for I'm overriding the maximum value instead of 128 It's going to be 64. So if I save that you'll now see we get a slower pulse But it's actually twice as fast as that default that we had at the beginning because we're going only half as bright And so that is how you can use named keywords Or named arguments. Let me say that again That is how you can use keyword arguments in your functions inside of circuit Python That is your circuit Python parsec All right, so someone said wow that was loud. What was loud what happened that was a couple minutes ago. Was it the Volume on the circuit Python parsec song. I'm not sure as my yeah my volume sort of a normal level, isn't it? I can turn I can turn me up just a touch there so that there's not such a disparity but tell me dexter starboard what was loud because I I would like you to have the The smoothest possible listening experience on this show Alright, so Let's see. Oh, and I should mention on this little example here because it's somewhat mysterious. What's going on? I just have one of our little trinkets. This is the Capacitive touch trinket. I'm not actually using the capacitive touch in this case but it's a very convenient little board you can see there just plug it right in and Into a USB port or port extender and then I'm just putting some diffusion plastic on top of it So it's a little easier to see. Yeah, so Dexter said Dexter said the circuit Python parsec intro was Intro sound was loud. Hmm. Hmm. All right Sorry about that Okay, so let's see what else is going on. I wanted to mention because I had gotten this wrong on my Tuesday show I said, hey, I'll see you next week Not true. Actually, I'm gonna be I'm gonna be off for Thanksgiving break next week So the Tuesday show and today's show the Thursday workshop show won't be happening next week I believe there are some shows happening next week, but stay stay tuned check for blog posts I think PT mentioned Their plans last night on ask an engineer so you can go back and watch that on on YouTube on the archive to see what What the plans are for shows next week and then I'll be back the following week. So next week Thanksgiving break I will be off Let's see next up. Let's get into Back into the project that I was Starting last week working on last week and I've continued to do some work on it both in software and hardware And that's this Pip boy over here the Pip boy 2040. This is the build part two of that So I'll I'll talk about a little bit what I'm working on and where I'm going with it So if you didn't catch this last week or for a refresher, this is a feather wing tripler with a feather I've got the RP 2040 and the joy feather wing which uses the Stemma over I squared C to sort of figure out all the button and joystick stuff on the board And then just send data over I squared C to the feather So it makes your code nice and neat and we'll take a look at how some of that code works for things like asking for button presses asking for the joystick position and Unlike last week actually have that joystick doing something. I think maybe we looked at just values raw values coming off of it and if If you recall a couple weeks ago, I showed that nice round rectangle display that you see there I still have the other one on this little breadboard here, so this was This lovely little round rectangle display and it inspired me to since it has kind of that four by three Ratio in those rounded corners like an old CRT little tube display. It kind of reminds me of the Pip boy from fallout In fact, I'll throw an image back up there because not everyone knows what the Pip boy is or the fallout games Let's see who Pip boy and you can see some images there So it's a wrist mounted gizmo inside of the fallout world There's been a few different iterations of it different shapes of it for different styles And these have been made by people including the Ruiz brothers as Raspberry Pi projects So I wanted to do a much smaller version of one of those Using this display here. So Let me let me show you what it's doing right now and then we'll talk about how it's all working take a look at The code and where it's headed So first thing to mention here is that I had Last time I don't think I still have that one here last time I had a couple of zip ties to connect it to a watch band and you'll see now I have the beginnings of a case here. So I started by designing and 3d printing a little sort of gently curved for the wrist A little Shape there that the board can sit on and yes, it's big but a lot smaller than the the typical Pip boy And this I designed it with a couple of slots for a watch band to fit into as you can see there And take that off for now Now I've also Just this morning designed and printed a little top for it And I just have that screwed on to with nylon 2.5 millimeter Hardware on to the feather wing The display and that's actually nice for keeping the display from wiggling because otherwise I've I've got it Going into some header pins there. So it's not as Stable as if it were soldered to the board, but I want it to be removable for For fiddling around with it and repairs and things And then the this whole sort of top section including the feather wing which drops down on top of the feather there Does in one spot right now connect up to the board and the Wrist mount using some more hardware using some standoffs there. So I'm next going to be working on sort of tying those together with a Sort of wall that goes around this Maybe that'll be one part of the display I've also added if you can see it there. Let me I've also added to this I don't think I had this last week this little on-off switch And so that is connected to the engage or rather enable pin that's on the feather And it just ties the enable pin to ground when you flip it on when you open that circuit It Allows it to start up in this case off of battery. I have a lipo battery Connected to the feather and under there and you'll see here it goes through a little boot sequence Actually, let me run that again. So I'm just going to turn this off unceremoniously and flip it back on You will notice I do still have the screen protector on there just gonna leave that on until I get the kind of final case So you can see we got our little pip boy logo some startup stuff our little Display for information on here includes things like stats inventory data map radio, and there's a little bonus game here and I've also got the cursor enabled here. So what I'm using the four buttons for is navigation if we go Down for example, we're picking different items in the stats page Like that If I use this joystick, it's now moving this little cursor around. It's a that's a little bit sensitive Let's see if I can do anything to dampen that that motion a little bit, but right now it's essentially remapping the value of the joystick, which is zero roughly to 1023 in each axis To a little bit less than the width and height of the screen just to accommodate for the the size of the cursor So doesn't fly off the edges so I think I have it going from zero to two 64 on the right because I have a 16 pixel cursor and To 40 minus 16 for the for the vertical and that doesn't do anything. It just looks cool Now this is a spring-loaded joystick. So you can see it returns to the center when you leave it alone and One thing I'll mention before it happens is that I have a memory leak Or some sort of memory Allocation error going on sometimes with the graphics and I'm gonna be talking with Scott and Dan About that and anyone else who's knowledgeable about what's going on because it's just on the edge of running out of memory Sometimes and then when it does it'll it'll crash. So When when that's happening for me right now is during image loads Even though I've got the images down pretty small It's still having issues sometimes. So so we may see that crash and We'll talk about that more in the future, but enough preamble I'll try going to the right with that and so what that's just done is moved from the stats section to the inventory section So now I can move down. Okay, there's the crash. Glad I warned you. I'm just gonna hit reset and each Right or left is just gonna move between these tabs and then up and down moves through the screens in those tabs And they have differing numbers of screens of information there. So if I go to the right inventory data Go to this map Go to this radio. Now if I go down, I'll go to the other station or back up Go left again to the map. I've got three screens of map on there. So it's essentially Just sort of a clicking around slide show. I'm not trying to have it do any real stuff I'm not trying to really use this cursor to navigate because actually kind of be a pain So I consider this more of a prop than anything else just a kind of cool prop for for some sort of a cosplay thing But I think the Platform might be cool for people who want to add to it You could for example use a feather that's got Wi-Fi or Bluetooth and then be able to Incorporate data from the outside with it or send data from it, which would be pretty cool and one other thing that I'm working on is I don't have a game there, but that looks kind of cool. It's just a screenshot one thing I'm working on is the Color palette so in I think it was fallout new Vegas the color palette was kind of an amber Amber type of palette sepia type of palette instead of this green screen palette I may just I think what I'm gonna do is make this be a startup thing So when you launch it you can pick which one it's gonna be by holding down or not holding down the select button That's another cool thing about this joy feather wing. We've got these navigation buttons. We've got this joystick This is a reset that's tied to the reset of your Feather and then this is the select button, which is just another general-purpose button on IO that goes over I squared C via the seesaw So that one's available for other stuff could be a enter button What I have it doing right now just for testing is it changes the palette of The screen I don't have a change in the cursor because that was giving me some trouble, but the the palette is being shifted essentially swapping the red and the green values and since I have a Mostly green Then it goes to a mostly red red, but it's it's got sort of shades to it. So it looks a little bit more sepia Of course another method you could use for this is just make pre make your graphics to be to have two sets of them Which may make more sense. You could be a little more fine-tuned about it I think then palette swapping but palette swapping is kind of neat It means that we're reducing the amount of memory required to store all the images that are on here and Cursor still works, but it's not switching colors right now and I think that's all it's doing. Yeah, so select should bring me back to my green screen palette and now I can go flipping through the images Nice that we're I've got it to be pretty stable that that will curse it right there, but it's not crashing too much right now and I Think it's it's a time to go and check out the code for this. What do you think? So let's put this back in here and you could of course customize this for different types of watch bands or Wristbands Velcro things you could sew it into Sort of the sleeve of a coat If you wanted to I'm just gonna break it. I just my very thin test print here Just just snapped so that the top of the band is no longer connected. So let's go take a look at the code though and what I'm gonna do is head to this view and Let's see if I can get that glare off of there. That's pretty good. Let me focus that for you So code on this. Let me go ahead and open that Unplug my other device. We don't have any confusion Yeah, and plug this in and I forgot I've been using a kind of cool 90 degree angle cable Which I left back in my inside studio But the little right angle USB C cable is kind of a cool one to plug in here instead of a straight cable just Could be kind of cool if you have this connected to a device or if you're running off of USB battery bank that kind of thing so Now we should be able to open up the code from the device And just because I'm accessing the disk It's gonna restart itself when I when I do certain things inside of Adam. Oh, I'm seeing a question I missed sorry earlier from Rebecca Wilson about the product pick show. Yeah, that happens at this time on Tuesday So it's a one o'clock Pacific time four o'clock Eastern times the same time as this show and if you head to our Blog is usually a blog post before each show as well as in our discord You can type in question mark show times and you'll get a little a little Schedule that'll print out for you Alright, so Whoops, where'd my there's my code. Okay, so some things I'm doing in here to talk about First of all since I am trying to stomp out these Memory errors that I'm running into you can see I'm importing the garbage collector. Remember I talked about that last week To check your free memory. You can also use the collect Function of that so you'll see It right here when I'm when I'm toggling the image. I'm doing this garbage collect which is supposed to be Freeing up some memory that was being used and I think that's what's Possibly not working. It was Lamors hypothesis is that it's not aware That things are being released to clean them up so I'm also bringing in the map range which is a Math from the simple math library allows us to take one range of numbers and turn them into a different range of numbers Which is super helpful Like I mentioned before I'm reading the joystick which has one set of ranges and I'm applying that motion to the cursor Which is the screen dimensions so different set of numbers We got display IO to display stuff seesaw so that we can read the buttons and joystick on the joy feather wing Using image load and then this is the driver for that display Setting up seesaw setting up SPI for the display the Set up the display and the sort of screen context and then this is this little toggle thing. This was Created by Todd Kurt. I was asking him if he had done any palette swap stuff inside of circuit python I realized I thought I had done it, but no I had been doing it inside of Make code there were some cool palette palette swap things I did maybe a year or two ago on some of our arcade Pricade and and and other boards where you can essentially Color your images with a grayscale or whatever you want and then just say this one palette I'm going to swap it out for a different palette So it's a sort of old video game technique that's used in a lot of other places super efficient and this was the the way that Todd came up with after just a little bit of experimentation which was Creating this palette that essentially swaps out the rg Values for each other so red and green become green and red And that's how we're getting this this little change into Amber which does not show up on the screen too. Well actually let's try a different page My display is a little it's a little bit blowing that out. Let me see if I can drop that Exposure oh auto exposure got turned on this. No good way down Hey, and there's our there's our crash. You can see If you read that says memory allocation failed allocating 33600 bytes which is the size of one of the images. So that's my first clue as to what's going on there So let that let that restart and I'll show you I can also Turn that palette swap on from the beginning If I resave this it's going to restart now and It's going to apply that palette swap so you can see all the screens even the startup screens are in that amber Look which he has super washed out on the screen. So sorry about that. I don't think I can Know what's doing auto white balance that doesn't help us kind of hinted a little bit that way and See next up we have An image being loaded as the background and at first I just load up this one called boot pip zero. So that's the that I'll show it to you right now. That's that first pip boy logo Then I'm gonna Create the cursor and so if the cursor on is true So there's a way to not have the cursor if you don't want it Then I'm also bringing in one of these two either the amber or the green Cursor so in this case I just in case I just made two different bitmaps And I want transparency for that. So as you can see this is a little triangle that's essentially got transparency there are their pixels even though it's saved as a Sort of rectangular or square image. There are pixels that are not showing up and the way that works is it is Creating a transparency from the first color in the palette, which I think I have it as magenta But as long as it's not a color. I'm using elsewhere that first palette color gets knocked out, which is great And then that's added to the tile grid and the screen context And then its position. I'm just setting it off to zero zero, which is the upper left corner To hide it during boot up and since the first 20 pixels or so are cut off by this rounded rectangle Display you just won't see them. You don't even have to take them sort of to a negative Value off the screen zero zero just make some pop off the screen Later, they'll show up and I'll show you how that works then we have some of our Code that I'm using to toggle that that amber color when I press the select button show the display and then this is the sort of Data structures that I'm using to go through the screen. So the first one is the simplest. So this is this boot file names, which is a list of these What seven images so the the boot pip zero shows up again And then I run through each of those sort of little text screens as it starts and then our little Vault dweller guy Given the thumbs up to see if a name. I can't remember someone tell me in the chat So vault dweller, do you'd have a name little blonde guy in the jumpsuit? It's his name I Find my discord chat to see if someone answers that where'd you go discord? There it is. Oh My just a brief Look at what's happening over on discord. We've got a lars Converted for pip boy use love that So the next Image set or list that I've created here is cursor file name and this is For toggling the cursor back and forth between two different image names if I do it that way This is a work in progress. So some of this isn't being used right now. And then this is the sort of most complicated one this is the Dictionary that I've created for the different sets of screens and so the reason I felt this was necessary Is that I have these tabs so there's six of these tabs which are the Stat inventory data map radio, and then that sort of bonus game one that's that's off the screen there The first screen has these nine The first tab has these nine different screens the next one only has two the nexus three the nexus three the nexus of two The nexus has two so that's these little sets of images here You can see I've also kind of named them for how how I'm using them zoom into the code a little bit more And so you don't necessarily have to do this with a dictionary You could do it a Little simpler, but I was thinking of using these names Instead of numbers here having like the inventory stats data and being able to refer to those by name also and so since I have that set of Essentially lists inside of a bigger list I Can later in code ask for the length of one of those sets of lists? And then I know how to loop through them if I if I look at you know more than two images in a tab That has two images I kind of roll back up to the to the first one So that's that's how I'm using that and why I'm using it that way the next of the setup for the buttons and so here this is some seesaw stuff the the Button definitions are actually on pins From the seesaw and I can name them whatever I want. So typically this is actually the button right If you have the joystick feather wing turned this way pin six would be called button, right? It's also called pin called a a on the silkscreen there. So if I Oriented this way, then I'm gonna have six be up Seven be right nine be down ten be left and then the select is is pin 14 this little Message here this button mask is the sort of single message that gets Chucked over to the board via I squared C on seesaw to say here's the status of the buttons So there there can be multiple presses simultaneously with that Then we have those all being set up as pull-ups On seesaw so SS is seesaw there and then these are some variables that I'm using to keep track of the state of things Actually, I don't think I'm using frame anymore But tab number which tab am I on and the sort of sub-screen within the tab number so we start off at zero zero So it's the first tab and the first image on there And then this is the function that kind of does the heavy list lifting So this is I define a function that called image switch and a direction So is it going to the next tab or the previous tab? Is it going to the next screen or the previous screen? So there's essentially four directions and I'm using a fifth one in kind of a cheesy way here for my Toggling of the pallet to amber so since I'm using these outside of this function I need these to be global This one actually I can hide that and not use that. I think that'll still work. Let's see But the tab number and the sub number those get used when I'm pressing buttons because I want to send to this function those values and So when I press a button it will call image switch as one of these direction arguments zero one two three or four So If I send it the zero If we scroll down here and look at what's happening when I'm sending button presses if The button gets pressed so the value goes low because these are pulled high on the Right button so that's this one here That went to the next tab why I do that it's because I'm setting it to say Image switch direction zero And I could even use that named Argument or keyword argument just to sort of document the code so direction equals zero there is Going to send this function Image switch zero so it's going to find oh if direction is zero here's what we do the tab number Which was originally a variable that was zero when we started the program becomes tab number plus one so it increments it up and then we do the modulo of the However, many of those screen maps we have so the length of screen map So that's these I think six or five tabs that I have one two three four five six tabs And that's what means it'll it'll wrap back around to the beginning. So that's why we're using that And thanks for people's help last week in getting my modulo math or Syntax correct. I had it had it messed up before left Will do the minus one If I'm sending a direction of down. It's gonna go and grab how many of those Screen tabs do we have the subs of those how long is that? List and then it'll do it in the negative if we go up or down And then the last one here is this cheesy one for palette swap that I'm using that I'm not happy with right now So we'll kind of ignore that again and just trying to stomp out bugs I'm doing some garbage collection and then the image and palette get set to be whichever one of these Images we have just asked for by Virtue of which button we pressed and then it shows that that image Does a little garbage collection if the color toggle is on then it runs that palette swap on it And it happens pretty much instantaneously before it draws before we see it Then joystick stuff. So here's the cursor stuff. So we have a Value of 004 our state to sort of remember where the joystick was and then we'll be updating that so we can tell if there's a change and this is what prevents us from constantly spamming the the Serial port with print statements or updating it constantly Allows us to only adjust when when it moves and this kind of keeps the cursor from jiggling which you'll often see if we're not careful about that so if we look at The Device here, let's see Yeah, we got a These are more likely by the way when I'm plugged into USB. I have noticed so that's that's something I'll mention to Scott and Dan Seem to happen more often when I'm plugged into USB, which makes debugging not fun so Let's look though at the joystick function here in the main loop Joy X is a variable that gets created by asking the C saw chip over I squared C to read analog to which is This way on the joystick in the orientation that I have it Joy X is in this direction And then this is what checks to see if anything changes on either one if the absolute of Joy X minus the last joy value Which will then update when we need to or why happens then that means something has changed And if my cursor is being told to draw then I'm going to set the cursor's X value So cursor dot X to be an integer of this map range Remember I imported from simple math map range so map range takes the joystick X value And it goes from 10 to 10 23 which are just by Experimenting I see that's really the extents of what I'm getting on this joystick So it takes the minimum of 10 maximum of 10 23 remaps that to 0 and 264 So that's left to right of the monitor without the cursor running off the side and up and down goes also from 0 to 10 23 but to a different set of values and I've also inverted it so it goes from 224 at the bottom and 0 at the top And then we reset the those state variables here So we don't update this when it's not changing and so that's what gives us this nice Joystick action here And you can do kind of cool stuff with this if let's say you only wanted the joystick to be on the left half of the screen You could simply map either just half of Let's just do it this way. Let's just map this divided by two So I'll do int by two and Also, by the way, I When I'm working on this I turn off this boot sequence because it it has to happen before I can see the joystick So when I'm working on this, I'll turn off that little boot sequence which is where that lives Right here. It's the last thing we do before the main loop of the program runs and that just says we're gonna load up each image from The array or list called Boot file names Just this list up here That little list there and it's just gonna run each of those for I think a half a second or three quarters of a second So if I don't want that I just comment that out right now I don't have a Switch for that a debug switch or anything like that But if I just go like this and save now Watch when it relaunches. It won't run through all that boot stuff. It'll just go The first image which I kind of have hard-coded and then it'll go jump straight to one of our screens Unless it's hung Or is it waiting for me to move? Yeah, sorry. It was waiting for me to update it. So now my Cursor only goes halfway, which is kind of cool because you could imagine that maybe Your Screen area that you're gonna use functionally is only a portion of this You can kind of leave it inside of a little list or something like that and Adjust where where the center is even of that. I think I just wiggled something and made a restart So Yeah, so in this case it never goes to what we think of as the first screen Until I press a button So it'll stay on that pit boy screen. There we go. That's just updated. So let's go and fix that Back down to the way it was It's not a bad idea also to set up variables like screen width As a number so that you can then just say half of screen width or half of screen width minus cursor width those kinds of things It makes it a little more portable code if you end up using a different display, but everything else you want to stay the same and Then the rest of this is just the button presses and you'll also notice by the way I change this value sub number When I go right or left if we had already gone down Into the number of screens. Let's say we're on the fifth screen of the first tab when I go right I just want to jump to the top I don't want to stay at that level or that level might not even exist if we don't have an equal number of Subscreens, so I just set that sub value up to the top So that means we jump up to the top of the next tab we can come scrolling down We can jump back left and we'll go back up to the top and that's pretty Typical expected behavior of this type of menu interface if you're if you think of the back of a digital camera or your Set top box or a Tivo that kind of thing you you tend to have drill down But if you go right or left you'll jump back up to the top. So that's how I do that All right, I think that covers it. So that's what this Little gizmo is up to now. I can Go to this nicer full screen of it Go I'm really happy about it. Let me know if you have ideas about some of this cursor stuff it's a tight little Tight little joystick with spring return. So it could be that you don't want a real Cursor on there like a mouse, but instead just use it to kind of wiggle up and down through menus that kind of thing It could be cool as well if we can Rotate or scale things on here if it's fast enough it might not be this might be another good interface for that I'd love to see someone write some games on this too. It'll be super super cool So, let's see. Let me check in with the chat Rebecca Wilson says thank you for the info on the show sure thing happy to help out there and Oh over in our discord chat. There's there's some nice graphic from What is that though? Oh, it's a little gift. Yeah, I think there's like a watch version. Oh, yeah, the animation is great love that Static images. Yeah, I had done an animated version of this But the update the frame rate is is just not gonna get that fast inside of circuit Python the way I'm doing it Maybe with a sprite sheet You might be able to animate it a little quicker if I have a single image loaded that it's just jumping between sections of That'd be super cool Let's see what else oh JKD is the one who asked the question about the latching relay just ordered one which should be in the UK in a few days Okay, don't break it if you're only getting one I'll sacrifice one if you don't want to we'll try that out So maybe we'll do that when I get back And let's see last thing I wanted to do let me I just need to kick this camera back on over here because it's shut down Due to the heat Because yeah, it's still hot down here in Southern, California. I'm pretending it's not by wearing a long-sleeve shirt But I'm gonna turn on my AC so that camera stays happy, and I just wanted to show you a little Quickie build thing I was working on All right, that should work and Let's do the bench cam in the corner there so I was working on some props for a play and I did essentially some magic wands Hair Potter style wands and one of the Versions that I didn't end up going with but but end up being kind of useful as I had a mini mag light and I wanted to Give it a Easy to use switch not the little screw end because I was planning to in add the extra wand parts up the top So I needed some extension there and an LED on the end And this is actually how I did the other ones they use pen lights and maybe if I get those back after the after the show I'll I'll take it apart and show you but this is essentially Taking the mini mag light as it is, but I've removed the this is an old-school one. So it's a little incandescent bulb This is the reflector top part and normally this is screwed all the way down To be off and then as you unscrew it it turns it on and the way that does that is there's a little spring-loaded Disc here that that increases or decreases its distance from the contact. So that means with this unscrewed it's on So I just ran some Switch one of our little clicky switches with JST connectors off of those I just was able to fit to Dupont connectors right into the ends there and then use some heat shrink to hold it all in place And that means we've still got access to the back here to Change the batteries out. This one takes a couple of double a's Triple a mag light mini mag light would work better for a wand. This was just too big and then in this case I've just plugged a big 10 millimeter LED into it and This is on the border of how much voltage this wants for this white LED So you might need to put a resistor in line for different colors of LED but it's kind of a fun way to have a bodge-together battery pack that you definitely don't want to Try to bring on an airplane. That's for sure switch switch views here. So you can see that a little better and Yeah with with some extra Housing for that to look like a wand and some little diffusion on there. You get kind of a cool way to Make a really robust battery pack. You could do it other ways Of course, but this was my What I have on hand switches and big heat shrink tubing version of a pretty sturdy little battery box So that's that I just wanted to show that off because I thought that was kind of fun Um Let me know if you've got ideas on on other fun mini mag light hacks I've I've had these around forever in my life and they're always Amazing how inexpensive they are for such a well-made piece of aluminum Gear I think they're aluminum. All right. So that's my little mini mini hack thing there Yeah, lightsaber in the works. It's true. I even Somewhere over here. I have a I showed this off before A really old flash bulb holder This is a battery pack from a flash bulb For an old camera flash But it's essentially the same thing this held dry cell batteries that go in here. Uh, this is Something that went on a somewhat standard mount on the side of the camera Flash bulb went up here. Uh Trigger was a remote switch that I think you connected to your shutter so that it would pop the flash But I've done similar things with this one. I built that into a power supply before as well Uh, all right. Well, I think that's going to do it for today. Thanks everyone for stopping by and I also wish you a very happy Thanksgiving next week. I will be off Next week visiting family and doing Thanksgiving things Uh, hopefully wearing flannel and doing the crossword puzzle and drinking hot toddies if I have my druthers Uh, and I will see you the week after that. So take care everyone and have fun making stuff and uh, Thank you all for stopping by. Bye. Bye