 Okay, now I think we're live on YouTube. Hopefully If anybody You know to buddy If anybody who's here is watching on YouTube We'll just drop a note if you would in the chat and let me know that you are watching on YouTube and that it's running the stream that is the way that I enable it was Looking a little weird So I think maybe it was not actually enabled until Just now kind of buddy Thumbs up, okay. Thank you live now perfect Okay, what did I double-checked on that buddy, please Octopus distraction technique. All right, so we're off to a Great start today, but that's all right. Here we go. So now I think we're actually ready to go in so So hello to everyone first of all happy Friday. We made it through another week So if you're here congratulations and hope you have a nice weekend and all of that stuff This is the deep dive program. My name is Tim. I go by foamy guy on github and discord The deep dive program is a weekly live stream on the Adafruit YouTube as well as twitch And I think several other platforms as well YouTube and twitch and then the chat is over on discord, which is the chat that is right down below me there on the screen So if you want to ask questions or interact or just hang out during the show You can either head over to the discord adafru.it slash discord We're in the live broadcast chat channel right now And typically that's where folks will be whenever there is a live stream going on Or you can join us over on the YouTube chat as well I don't actually have the twitch chat pulled up So if we do have viewers on twitch my apologies, but I won't be able to see your chat over there If you want to ask questions or interact Discord or YouTube are the places to do that If you are new to this program, you don't know what it's all about We are working on something called circuit python. This is the main website for circuit python Circuit python is basically an implementation of python that runs on tiny computers called microcontrollers There's a bunch of pictures of them here. Sorry, I'm playing cat distraction here to hopefully wear them out a little bit These tiny computers here so like you can see on this downloads page, there's a bunch of different pictures of them These microcomputers, excuse me these microcontrollers come in all different shapes and sizes They have all different sets of built-in peripherals and things like that You know each one kind of specializes in its own thing Some of them have you know more or less built-in hardware like a raspberry pi pico right here is pretty bare bones It doesn't have hardly any built-in hardware. It's mostly just eye-opens Whereas something, you know like this macro pad right here. It's actually got a lot of built-in hardware It's got a display built-in. It's got a rotary encoder knob. It's got 12 Neopixel keys. It's got a Stemo plug hidden on there somewhere. There's all kinds of things built into that one So these things come in all different shapes and sizes But the common thread that binds them all together is the fact that all these devices on this downloads page Do support circuit Python, which means we can load circuit Python on them And then when you plug it into the computer It will show up like a thumb drive with a Python code file on there You can edit that code file and it will execute the code that is inside of it And there are special circuit Python APIs in order to interact with all the hardware that is connected to your microcontroller Be it stuff that's built-in like on this macro pad or stuff that you connect like through these eye-opens on the side here with your own circuit So that's kind of the the quick high-level version If anybody is new and wants to know a little bit more I can't expand a bit But that's kind of the brief summary version that we just like to put at the top of every show that way in case Anyone's watching the VOD who hasn't seen before they at least know what's going on. How's it going? I probably will mispronounce it my apologies, but WJF W Jodaf W Jodaf has a going over there on YouTube. Nice to have you So that's the high-level bit circuit Python. I will say circuit Python It's an open-source project anybody is allowed to use circuit Python on your own hardware Anybody is even allowed to add support to your You know add support to circuit Python for your own hardware. Many of these devices are third-party like this Raspberry Pi Obviously there. There's a a citron technologies seed studio makes a lot of these microcontrollers Pimeroni has got several different devices in here wave share. I know as well So anybody is allowed to make their own hardware and then add support to circuit Python for it It's an open-source project the way you contribute to it is by You know contributing via github. That's where the project is hosted It is although it is open-source and it's free to use it is primarily funded by this company Adafruit, this is their website Adafruit.com. There are hardware and software company based out of New York They design and manufacture microcontrollers Some you know many of the devices listed on this page are Adafruit designed and manufactured devices They also design and manufacture breakout boards that you can hook up to your microcontrollers and do all sorts of things with as well As other hardware peripherals like RGB lights and buttons and beepers and buzzers and sensors and all kinds of things essentially So head over to Adafruit.com get yourself some goodies from there And if you do make purchases from them, you are helping support the circuit Python project Of course since they are the ones paying the folks who work on the project So thanks to everyone who does purchase stuff from them One more thing bit of how hey, hey, hey, hey, hey, hey, no pouncing no pouncing. Hey Hey Take your bouncing legs off Have a cat fight here trying to avoid that One more bit of I guess you could say news before I jump straight into the actual stream I know we're rambling kind of long this time But I promise we'll be getting into it in just a minute But I wanted to highlight this because I think it's a really cool Opportunity that's coming up. I found this this week. I don't actually know where I found this But I found this link this week and I found this hackathon a game Game hackathon which has a different term. I guess no they do just call it a hackathon. What's the game? Oh Like loom dar, there's a different term for a game hackathon, but it's escaping me It's escaping me right now. Anyway, though This is a hackathon that's going on. It's open to Anybody can participate. However, there are cash prizes and in order to be You know in order to win the cash prizes. I believe it is Unfortunately specific to Canada and United States. So I know we may have viewers in other parts of the world This particular thing. This is not affiliated with Adis fruit or circuit python or anything like that I just thought it was an interesting You know event that is going on If you do want to enter and be able to win the cash prizes You do have to be a resident in Canada or the United States though But this is a hackathon that's ongoing. It lasts for about a month It did start a couple of days ago. So I think it started on the 17th And it goes until April 17th. So there are about 24 days To work on a game at this point and basically this hackathon I believe it's like presented by Microsoft or funded I suppose the the cash prizes and things like that come from Microsoft and It's pretty wide open. It seems like you can build pretty much any kind of game you want using Python And I think that's a really cool. That's a really cool thing I don't know for sure if I am gonna enter but I am Considering it if I do enter, I believe it will be a circuit python game that I work on So if anybody else is interested in game development, I will drop this link in the chats And I will try to remember to submit this one to the Newsletter this week I have not done so yet So I can't promise that I will recall remember to actually do that But that's what I want to try to do is submit that to the newsletter Hopefully this week that way there are still about like three weeks or so left in it By the time we get it in there that way we can help get the word out and folks will still have time to actually work on their game so if you're interested in game programming check this out and You know if you want to make a circuit python game, I believe that's that's fair game since it's You know an implementation of Python. So That'd be super cool to see folks build out games and enter for that and now into Actual what we want to work on today. What I want to try to do today is Follow this guide about how to add a board to circuit python In particular what I'm interested in though is adding a board that has a built-in display and I'll be testing this out I'll be tinkering around with boards that don't actually have built-in displays We'll just have them connected through extra wires But you know technically it's gonna kind of work the same as if it were actually built into the PCB itself I've got the camera pulled up here. So I'll show you like You know right here. We have a feather RP 2040 This obviously has no built-in screen on it just a feather. So what we're gonna do there is we'll be able to plug in whoops We'll be able to plug in some of these feather wings like this joystick feather wing or one of those something like this one or something like this one We'll plug those in and we will try to wire them up and Make a build of circuit python as though it were a built-in display more like this one, which is a feather tft This one does actually have a display just built right into the the PCB there and so You know I'm not necessarily intending to like add these boards to circuit python So that you know they show up on the downloads page like we were looking at I'm gonna be following the process that would ultimately you know End with you adding a board to this page, but my intention is not necessarily to actually add them to this page my intention mostly is to Practice the process figure out if I can do it or not and figure out how to do it And in particular how to add those built-in displays is kind of the main thing I'm interested in So which one do we want? I actually have a handful of these things here to try out Which one do we want to start with so for sure? We want to start with one that Is spy spy display If T backlight controlled by I to see Any color so I don't know for sure if this is a spy display, but I'm gonna look that up And if so then that's what I'll start with This is a Joystick feather wing Okay, so this one's using the helper library which kind of does all this stuff for you We want to see this Go to here. Yeah, here we go simple test Okay. Yeah. Yeah, this is looking good. This is a Spy bus Turn it into a four wire Pass it to the display constructor Okay, so this should be a spy display. I think we'll start with this one. I'm gonna plug it in To start with we'll run this Simple test here just to make sure that our circuit is actually good In this case, it's just a feather doubler everything's all just plugged in so there's not much of a circuit going on there So hopefully we'll Slight that up and it'll be Fine the first time do we have this on not yet. Let's do that Okay, you can see backlight turns on but it won't actually do anything else yet Most likely unless there just happened to be code that initialized it on there Which there probably was not There is Ethernet testing code. We can Overwrite that because that's in the Ethernet library. I don't know if all these pins are right Let's look in this library as well the The next level up. So this is the display driver. Let's make sure this is display IO as well, right? Yeah, okay, it is. Okay, so this is the display driver but there is also the Feather wing library Which is what this example is doing instead of actually directly using the display driver It's actually using this Adafruit feather wing Importing the mini tft feather wing and then all the initialization actually happens inside of there And it gives you an easy to use interface to actually access all the hardware on that feather wing So let's look at this because this will tell us If the pins are the same I'm not gonna worry about buttons yet I wonder if we're gonna have trouble with the backlight Since the backlight is connected through the seesaw Not sure. We'll see hopefully not hopefully we can hopefully if we don't initialize it It will be on by default that would be ideal so that's just going board spy and then DC CS which are defaulting to D5 D6 Which defaults are past here? Soon, that's where that's a yeah right here. So those are defaults and so we are getting D5 for CS D6 for DC and That is D5 for CS D6 for DC. Yeah, that is the same. Okay reset. Are you using reset? It looks like Where's this? Reset is past a four wire interesting Reset you set the display via. Oh This may not be the best one to start with Because the actual Reese it's it is weird that it doesn't pass it to here though, right? It's kind of weird that it doesn't pass it to there I don't know if it would be able to though because it's not a I don't know. It's It's a seesaw digital in out not a microcontroller.pin Let's try without it. I kind of don't think that will work, but see this is the size Actually, let's take all of this stuff. I think we'll need all of that. Okay save that it's Probably you crash for not having the right libraries or something first Let's go sir cup install. I'm just gonna do auto actually. Oh New sir cup codes running Doesn't actually show anything on the display though. I think it's got to be that reset pin most likely So if we cheated kind of like we did this Where's that? That's before the four wire. We don't this won't be self class no So I'm gonna try this to confirm, but I think what this is gonna confirm is that We can't actually It's not gonna be as simple on this one because it would have to initialize the seesaw in addition to The display it would have to initialize the seesaw in order to be able to Initialize and use the display Which is a bit harder. I don't know how to initialize the seesaw from in the core. Maybe we could look at Well, something else. Maybe there's one that has that Happening just address Is address blank? So I will try a different one that turns out to be the case button mask I feel like we shouldn't need this, but that's right. We'll get it. Oh my goodness, right? Those aren't declared Yeah Should it set it back the other way to or yeah, I don't know seems like it just sets it to true and that's it We actually don't need but button mask this we don't need that's for the buttons That is for the buttons on The feather wing which we're not interested in right now So create the seesaw set the pin number eight to output right the pin number eight to true And then basically do everything else the same So The size is off a bit. I think Maybe it's a rotation thing Yeah, I think we probably want this. I mean technically it doesn't matter. I suppose But it's it is looking like we would want these switch straight It looks like it's not drawing here and it's drawing too big this way. So I'm guessing that these are swapped Which board is this one good question? This is a Feather RP 2040 and then it is a mini tft feather wing Or just take it's joystick feather wing Mini color tft with joystick feather wing So it's that feather wing connected to a RP 2040 feather and in my case it is connected with a feather tripler So That did not work either Okay, so first things first is this actually oh, okay. No. Yeah, this is just doing 128 by 128 which totally uh Is not respecting the size of the display at all so The display is actually initialized fine middle There we go. All right now we're all set there um See saw Let's look at What's the glasses one? The uh, not the newer like rgb lights glasses, but the uh, the halloween glasses the eyes It's not halloween I'm still learning to wrap my head around the seesaw. Uh, not the simplest board to start with that is true Yeah, the seesaw is like a uh, I think of it almost like a Like microcontroller swiss army knife. It's like a a little widget that does a little bit of everything um And it lets the main microcontroller kind of offload some of that work over to this sort of secondary One and it's very um, what's the word like adaptable. It's very Can do many different things it can be set up in lots of different ways Oh I'm trying a name on this intelligent io expander. There you go um What is the halloween eyes one gosh, mon mon monster mask monster mask. That's what it is There we go This has a seesaw built in I don't know if it uses it in here though. I kind of doubt it, but maybe See because I think the thing here is that the main screen which everyone is considered the main one Has pins wired directly like for the reset pin for instance Um The secondary screen because this board happens to have two screens the secondary screen I do think is wired through the seesaw I yeah, we probably just we'll probably try a different one Um, let's try this. Let's get us anything now I know there are more devices with the seesaw built in but I don't I don't think there are any Or I should say maybe I don't know of any Where the actual display pins are On the seesaw rather than the main microcontroller I get pie gamer. I don't think it's going to be that way Pretty sure this has a seesaw built in though. So it's like Part of the way there No Well Let's do something It's not importing i2c for anything. So I kind of doubt it No Excuse me Okay So that one's a bit tough Because the display reset pin is actually connected to the seesaw I'm 28 by 64 OLED OLED feathering. I think that this is Maybe i2c which we don't Want to start with either Doesn't the circuit have one I'm not sure what you mean. Doesn't the circuit have one The the seesaw it does it does have a seesaw built in To the the feather wing that we were looking at But I don't know how to initialize it and do stuff with it from inside the core Um, I know how to do it from the circuit python level Well, I unplugged it now But like the code we had in here is how to do it from the uh the python code or the circuit python code But I don't know how I don't know how to do it from inside the core or if it's possible to be honest I mean, I'm sure it is possible, but is this an i2c display? Or is it a spy display? display i2c display Oh Either Did i2c? Can it be spy? Probably not right So this is where I want to get to eventually I do want to try to add an i2c display But I don't think any other existing devices Use i2c displays And so I want to start with something that does exist just so we're not like In unknown territory right out of the gate Although it does But this is saying that the display Can use i2c or spy And if you use spy then This pin on the display would be mosey This pin on the display would be sck I don't know why s they're like crossways. I'm not sure why that is but on the feather though This is meaning that it's only on sda and scl which is i2c 1213 aren't hooked up Just using spy pins to run i2c. Well, I think the um I think on the display side Basically you Those pins work as either But in this feather wing, they're actually hard-coded. I believe to these sda and scl If we had the display module by itself Like the raw display by itself without the feather wing then I think we could feed it spy But it looks like the pins aren't broken out So that's i2c um, so Not to worry We can use either I spy uh, or I have 3.5 inch feather wing Which this one I'm pretty sure is spy But I'm gonna go with i spy first because i spy is definitely spy It's on a pico w is a micro usb Here to not have My micro usb cable I plug this from this One second. Sorry it occurred to me partway through that. I probably should have muted before I did that. I apologize if that was loud My uh microphone stand arm thing came off of its Mounty bit Let's see here We need more esp 32 s3 stock I would say personally I'm pro more stock of everything. Um However, I don't have any Say in that matter myself Or even any kind of insight or anything else about it, truthfully I am uh Remote I'm not actually at the ate a fruit factory and I don't do anything like physical everything I do is software I wish this was like a touch smaller I'm just gonna put it out here You can't see the circuit anymore, but you can see the display which is like It's the important part Okay, so this is using a st 7789 It is using spy going through four wire We will need to select the pins because it's not It's a pico. Therefore it doesn't have board dot spy We're gonna have to probably add board dot spy actually, which I think It's not really intended to do on this device But I think we will actually need to add that because If we don't add board dot spy that means that user code is not going to be able to Do anything with the spy bus, right? Like it would have to initialize it like this and it will raise an exception that says the pins are already in use Or I mean it could release them and then they wouldn't be in use, but Yeah, I think we'll have to make a board dot spy actually Display data sheet indicates that the interface protocol is pin selectable. Okay, I too see mitigating protocol select interesting Let's take one more peek at the At the product listing sometimes there's a jumper situations like that The bottom side like address reset why that's like that I see address Yeah, unfortunately doesn't look like it's broken out on the On the feather wing the way to jump that Would be kind of interesting though Yeah, uh, wait, so that's interface That says five It's five broken out to anything kept us open Tied to high which is i2c, but we're hard-coded to i2c. We'd have to break this somehow And tie it to ground instead and then wire mosey and sck into these two In order to be able to do all of that thank you though for Checking out the data sheet. That's actually cool to have confirmation and even I'm honest. It's cool to be able to actually see the um Wiring diagram circuit diagram there and actually be able to tell what's going on with it Been up all night made two pcbs and a 3d printed design I'm bushed with will fall asleep watching you though. Oh nice. Yeah I have wish you the sweet dreams. Have a good night and all that stuff I definitely do get some sleep nice to have you here for a bit while you're awake. Um Okay so in this case we need to I think we need to make a board spy and then we can hopefully Do the rest of this stuff to initialize the display So i'm gonna go to core i'm gonna Should have updated before I started but I didn't so i'm gonna check out main Gonna update it's probably gonna take a minute. I apologize Did I do fetch sub modules? Probably should Let's try without well. No, we should probably do it Let's do the pool and then we'll Submodules Well, that's working. We can start looking in this stuff though. Uh, so i'm gonna be going to raspberry pi i'm gonna be starting with a copy of pico w because that's what device I have I'm gonna basically take a copy of this But we are gonna Do some more stuff inside of board This update canceled I with the update cancels again Why can I not just update please even show me what files are you different? I did not change you get reset hard But that's not gonna pull I have to pull after I'm able to render Factory not empty Head is now this He's actually update Don't clean don't make anything just Pull Still shows those It's gonna work I really wish I knew how to recover from this state Now it's two different files I don't understand why I cannot tell it to throw away whatever Changes are on my local one and take whatever's in the repo I don't care that we can't save my stuff and bring it back because I don't even really know Why it's changed. It's not actually my stuff. I don't understand how it got changed I wish I knew how to tell it to throw that stuff away and pull Main Just park me on whatever the current main is I consent to having whatever needs to be deleted or undone I don't understand why it's so slow either. I wish I could see more output too like It's kind of takes forever and then it's done Or it takes forever and then it fails It's not done It's gonna be take forever and then it's done though this time I feel like it's even slower than like cloning a new one sometimes like I don't get why pulling Even when it works like pulling takes kind of a long time for this project for me But a clone doesn't I don't think take it's canceled for no reason It's canceled I'm not gonna tell you why it's canceled Don't worry about it It's kind of frustrating I think I used to get rebase. Yeah, I don't know how to do get rebase. I need to learn apparently I guess I don't I feel like I shouldn't need rebase though. I feel like it should be Really really much easier for me to throw away whatever changes are preventing me from Pulling like an event window You know, there's just like no output for that. So I just can't see why that failed Now these things are different again. Oh that is Kind of frustrating to be honest See like that was a full clone right there. That took four seconds But in here it was like Almost a minute or two, right and then it didn't even succeed Like what I don't see where the time difference I already was in another of these right like I keep making these because I keep eventually getting into a state where I can't recover I wish I could disable that somehow Did I spell that wrong? Oh boy, I feel like we're one thing after another with this one today, huh? Get sub module I don't think I've ever seen that before Usage Get sub module quiet Boy, I don't even know. I don't know what to do We can't make a build without getting the sub modules I don't know why the sub modules aren't working What's your blob none? There's not even this like not even a useful error message here because there's nothing to like search really, right? It's like basically telling me that I Just have wrong flags or something Because saying like this command Doesn't work the way you passed it And then it's saying like here's all the options for the way that it can work But it doesn't say like You know this part is the part that was wrong with it or whatever. It's not like unknown thing filter It's just like Usage here's how you use this Usage here's how you use this init I Like I'm taking 10 steps back Hero steps forward right now. All right directory. Is it Need fetch Regular fetch. I don't know what to do. So I guess we just can't use this snooklum you need An up-to-date version of git out of How do we get that 0.39 This does just says installed and not update. Okay When did that change and why? Okay, we're not just gonna old man complain about updates they're like Miles and miles into the rabbit hole here. Are we using one that's not I don't really understand that seems kind of crazy to me that But Suddenly we need a version of git that is so new that you can't install it on Pretty much the current version of ubuntu. Is there like newer Ubuntu at this point? I guess like And this is not mentioned anywhere inside of here. So It's kind of on your own to figure out how to get it Even is the recommended version. I don't know. That's kind of not ideal Submodule update in it and this says three commands I don't get how that becomes broken like that Out of the VMs inside Actions do it Filter is too new Did we change something to use filter? Can I just not use it? I feel like this worked Three days ago, I don't it feels like we just have no Working process right now That's the case Can I take this off? Three days ago Submodules update Submodule update Yeah You and me both Yeah, I though Noticed Sounds like the music player was killed I was like, why do you think I'm looking at you? I'm going to restart the music And in and out could so could be totally off base. Are you in a custom python environment for circuit python builds? Uh Not currently I'm in Actually the truth is I don't know The short answer truth is I don't know I Think that I am in Not a virtual environment and instead in in Python 3.10 that is installed inside my system Yes, I know they say to use virtual environments. Sometimes I do Sometimes I don't I believe I'm in my system one. Let me read the rest of this as well. I had a while back No Had an issue a while back where my base environment was polluted and Get and CMake weren't working well. I created a new environment and it worked. I think because BCC didn't have a bunch of conditional linking taking place that my base environment had As a result of anaconda. I have never used anaconda I have heard stories of stuff like that though where it's different than regular python or whatever This feels like a different issue. But who knows? Yeah, I'm thinking niradak is probably Right here. I'm thinking this issue is From this change here where we started having this And this apparently does not work on Anything except the brand newest git, I guess or whatever like A version of git that is too new for me Time for me to hit the hay. Yep. Good night. David. Dessa. Thanks for hanging out for a bit Sorry, we didn't really get into the actual doing of the stuff, but Hopefully you at least had an enjoyable time watching me troubleshoot Which probably revert the change. I agree I don't feel like I necessarily Get a vote. I don't feel like it's really my place to have an opinion one way or another because it's also beyond me What this means or what it does or what the upside is But looking at the downside Which is that This page is no longer accurate and there is just no way To follow the instructions on it. I feel like is a pretty big downside personally so While I don't understand the upside of the change It would have to be a really really really really big upside for me to think that it was currently worth it to be that way um Now if it was just as simple as like pseudo apt update git or whatever right like if that's was as easy as it was in Using the stuff that we say is recommended here That's not so bad, but Seemingly either. I don't even know I guess I would have to build it myself. I'm not entirely sure how you would get a newer git this one Kind of seems like it worked. So maybe we're Maybe we're good here So i'm just gonna go boards. We're just gonna try to make pico w with no changes Make board Yeah Now's a good time to mention. I guess if the stream cuts out. It's probably because my computer froze Fingers crossed that that is not gonna happen But I also still had this segmentation fault problem. Isn't there something about Respirate pi needing a different Okay, not raspberry pi pico Respirate pi linux Okay So no I have the right one I just died part way through so Fingers crossed I'm gonna try again I hope my computer doesn't crash Can't watch Not letting my guard down, but it feels like We're doing pretty good so far overflow hook Kind of a board Okay We got a build Boy, I feel like I have been on Quite the journey already so To start with I'm gonna Nice and easy we are just gonna make a complete and total copy of pico w With no changes. I'm not even gonna worry about trying to add pins or displays or anything At first. We're just gonna duplicate it straight up and see We actually can get a build of our Awesome different board to add any of it to the repo. I'm not gonna commit or check in any of this stuff Should probably start a new branch truthfully though. Please don't do a whole another. Okay. It's the heap corrupted Uh, so is all is that all you need? So at this point in my theoretically thinking that This should work I'm at a bit of a loss on the segmentation faults. I don't know Really what else to try Yes, I can't say that I Tried that much, but I've tried everything I could think of which is updating everything that I can update And uh swapping ram thinking maybe the ram was bad, but I have still seen segmentation faults with the new ram so Sorry to think maybe the ram was not actually bad But what else can cause the segmentation faults so randomly during the circuit python builds Maybe I'll switch the ram to the other slots Maybe one of the slots is bad or something Okay, that's actually that was that was pretty easy Um of all the things I've done today so far for this that was definitely the easiest Uh, so that's actually yeah, that's really straightforward. We don't need to mess with too much here. Um I'm not gonna mess with any of this stuff. Honestly Anything in here. I don't think Um Eoretically, I guess we could change these. I'm not even gonna do that right now. Truthfully I don't know what this stuff means Not gonna mess with that I think board and pins Is technically where our changes are gonna be And I guess what we're gonna do is look at the feather our P20 40 I wonder if I is this a bad one to do because of the wi-fi chip Is the wi-fi chip also on spy? Wait, what? This doesn't have a stem. Uh, that's interesting Ohy Only thing that says spy in here at all is this There's no spy in here either. Ah, okay. Here's where Is it? No spy, but yeah, okay So my two, uh Is the interesting Convenient but a bit awkward since it's not part of the main board So I'm pretty sure we're gonna need these We don't You don't currently have them We're gonna have to figure out which pins to use So Clock is gp10, but the problem is it's I don't think it's actually just gpio 10 It's gp10 here. It's actually gpio 10. I think Okay Um, I'm not gonna make it. I'm gonna have to run to the restroom. So I apologize, but I'll be back in one minute Got a regular pico so far. I played with lcd 20 x4 any advice on what to buy or play with what to buy to play with for the pico Boy lcd 20-4 I assume that's like the Yeah, one of these ones is what I was thinking. Okay Um, I mean that's definitely fun. Personally, I'm big on displays So like I'm always down to play with display. I owe stuff personally. I mean, I don't know if that's what you're into as well, but um So I mean on some of my picos like we were just talking about that cowbell Which is like kind of a multi-purpose breakout for the pico I've got a couple of those wired up to allow me to attach other displays Um Just the kind of stuff that I tend to I don't know if you can search that way, but maybe tft is probably So it's like all the um I spy ones with the ribbon cables, which is like what I've got hooked up here This one's with the ribbon so it's like an I spy breakout Well, the I spy breakout is this thing over here And I have mine connected up to a pico even and then ribbon cable from the breakout to the display And you can actually use the pins here if you want as well. You don't actually have to use the ribbon cable um, that's the kind of stuff I tend to lean towards but Yeah, I don't know. I would say it depends Kind of on yeah on the projects, um that you're interested in different screen or sensor Yeah, sensors are always good for a basic thing to play with maybe temperature or humidity or something relatively basic Like that's always a good Good one to kind of tinker around with So that's going to be 10 mosey is um 11 which Is actually straight through to 11. It's nice these line up actually I think that's not always the case, but i'm not sure and So we don't really need me so I don't think um I guess we should figure out what it is and I assume it's going to be probably 12, right? GP 10 GP 11 GP 12 The GP numbers are the ones that we're on for this GP 12 Of this and then we need a thing here Or spy If it matters if it's before or after that Okay, so If that worked we should be able to make a board make a build and have a board.spy I think just take a quick look and see if there's anything else spy and any of these No, it doesn't look like it. Okay. All right, so fingers crossed Did we clean? I'm gonna do no clean I'm basically on no clean until further notice just because like If it doesn't clean then I think it doesn't have to compile as much and if it doesn't have to compile as much Then I think there's Less chance for the segmentation faults Now what I don't know though is if you don't do a clean is it actually going to pick up my changes To my board files that part. I'm not sure the cowbell Breakout thing is kind of nice too if you have a pico because it has the reset button on it I got spoiled by that a little bit when I was using the cowbell Um which comes to mind right now because now I have a build that I'm ready to install We need to get to bootloader and I don't have the uh, I don't have the cowbell. So what we are gonna do is Use the boot select You can't actually see but I'm gonna hold the boot select button And essentially just unplug and replug the raspberry pi pico w Just gonna get us to bootloader mode So that we can copy This firmware To you need to copy it to a place. You can't just copy from a thing and not to a place How that works, uh, tim c Yeah, that one Thank you for the help near doc if you're still around. Thank you for the help on the uh, the make stuff I would not have probably known how to Pass that without your help. So Super duper appreciate it. Okay So that rebooted came back up Uh This is still working, which is interesting, but I guess it does Yeah, I don't know. I'm kind of surprised. I feel like that means it's likely that this is not working Because if this were working then I think that this should have failed from user code Says spy though does say spy. What if we try board dot spy? Hey, okay Nice. So we added spy bus Now let's go find a display thing um Maybe do we not actually need the spy? I feel like that's necessary though If you want the user code to be able to use the spy bus I don't know though. I don't think we need that one Cowbell looks useful. Thanks. Yeah, for sure Delay get used for What is this delay? Why does there a delay defined but then Oh, this one is actually used. Okay Yeah, this one's used a couple of times actually. Okay, fair enough Macro pad I guess for whatever reason macro pad has delay, but it doesn't get used for anything. It doesn't seem like I'm gonna steal. I think Start stealing from pico system and see where that gets us Um, I think we'll need pretty much all of the same imports And I'm gonna take this up to here It sequence is gonna go inside there coordinate so On the pico system does it show Yeah, so we basically just are gonna use the same ones in here so for us that's um 10 and 11 And then null is for The miso which we don't need false Spy Bus Bus these we need E so 13 No 13 is cs dc 6 reset is 9 Baud rate. I'm just gonna leave alone construct display It's actually 240 by 240 I wonder if the Is the pico system the same display boy, that would actually be Pretty convenient, right? So I know it's 240 by 240 Say anything about LCD and backlight and say which I think it is the Don't know why not Okay, I have row start 80 I'm actually say anything about like row start All start It always says row start 80. So I guess I'll leave that But not touch call start. I'll leave rotation alone for now All this stuff probably backlight pin. I guess, um I don't know not 12 though 12 is one of our spy pins We don't think we're using the backlight pin. Does backlight get broken out through uh the iSpy Ribbon cable It's not the right path. Where's the uh, I want the breakout a backlight I'm connected Gonna bed head out for the evening. Thanks for the lovely stream as always cheers all. Yep. Thanks for hanging out cute the e Nice to see you. I'll see you around next week if you're around for that. Let's have a light is Just not plugged in right now um Yeah, I plugged in uh, let's just Take a random pin that we're not using Where's that pin out? um I'm definitely not using Okay, this is flipped around on me though I'm definitely not using gpio zero right now So we'll just set. Whoops. We'll just set the backlight to that even though it's not actually connected And it will just not do anything. Well, it'll toggle that pin. I assume or something but Do anything else That's not the display we're using Did I I say zero and then put one I did right? There is a zero Oh, but it's only one zero I don't think we want zeros on those I got confused with the oh Actually, maybe that's already that's I think that's already, you know Yeah, it's already, you know fair enough Okay, okay start sequence but What is the right format This is basically three But that one's more They're basically comma separated Some of them are hex Some of them are Just int What we have here is I guess three sets of hex I guess let's try to put them in as Three sets of hex What a worked except for a screwed up the uh Do this feels like something like ancient arcane mystical spell Get all these numbers in just the right spot Send them just the right way Mystical pixies will turn on inside the flat black box It's not perfect, but Closer than what we had before I think we're using this I'm gonna oh, I don't even okay. I was gonna say I don't know But commenting it's out Here's crossed GP I Oh Yeah, oh Same thing That was really fast. Do we think that? Actually got the real stuff in it I'll try it. I guess Is there a reboot to bootloader from the repel? Is there a way you can do that? Isn't it like can you do like microcontroller reset or something like that? oops Unnext reset I think you can call this and then call reset Nice, that's actually super convenient for this one without the reset button, honestly uh, so next we would Need to basically change this code I think but I don't know exactly Other than just basically unplugging and replugging. I don't know really how to check if it worked Because we initialized it in the core or if it worked because our old codepie Actually was doing the initialization for us. So I'm actually just gonna unplug replug If we get a display Which we did Which is awesome. That means this worked Because now I have no setup in here All of my setup is inside of here And okay, so we should also be able to go. Let's do This It's upside down technically, but uh, no, okay. We don't have display though Don't have display. So it initialized It's working correctly. I think But it didn't add it to board. I think that means we missed one of those things, right like, uh Inside pins. I think is this Should be another one of these I think right Do we have a comma here? Were we ending on a comma before? I feel like we must have been ending on a comma probably Whoops, interesting. It's doing more stuff this time. I guess it knows some more things changed. I don't know What was that? Oh Oh boy, no, okay Thought that was probably a segmentation fault, but no, I think it's just something with the display undeclared. We need to Do something else. What else do we need to do? display It makes sense probably what we need I will be winding it down here pretty soon I want to see if this works and maybe test a few more things on it before I go But I'll probably be wrapping it up after that Um for anybody that's interested in this type of content. I do also stream on saturday mornings at 10 a.m central time Uh, which is tomorrow morning at 10 a.m central time. That's about Well, so we're 10 minutes past the hour now, but if we pretend that we were at the top of the hour So if it was six instead of 6 10 that would be 16 hours from Six whatever time zone you're in In about 16 hours. I am gonna be streaming again on my own channel Uh, if you are interested in hanging out or watching along you can head to that live broadcast chat On the ate for discord and I'll drop links there When I'm about to get started I don't know exactly what I'll be working on Uh, maybe continue on this kind of stuff or maybe work on some other things. I don't really know yet, but That'll be tomorrow morning For folks that are interested It's interesting. We still have like whatever was on the display before Doesn't like clear itself when you go to boot load or anything And unfortunately it printed before Our to connected so we don't actually get to see the list in here. I'll just do it again What doesn't have display It does they're in alphabetical order. Did it have that before? No, okay, thank goodness. Geez I totally was looking in the wrong section here I was looking down here for display and I decided it didn't have it but the truth is it was Would have been up there And we do have it now so Can we Start using it like a normal built-in display because if so then we succeeded and that's awesome So let's just do something basic here Let's get a bitmap Let's get some imports Let's get a bitmap Bitmap that's going to be what height width Colors, I think height width. Let's go Oh, let's go all the way with it, right display equals four dot Display this is going to be Play dot width Display dot height colors. Let's call it. I don't know four maybe We could make this bigger We need a palette We'll go four on that palette zero green pink yellow blue Thank you for the stream. See you for your coffee tomorrow. Yep. We'll be back Not quite bright and early, but Definitely coffee time zero one two three four. So we have a palette bitmap palette. We need a tile grid tile grid equals Tile grid bitmap is bitmap pixel shader Pixel shader is palette Uh, we need a group main group display group Main group Main group dot append the tile grid. Let's go bitmap dot import bitmap tools bitmap tools dot Fill region BMP zero zero Display width over two Display dot height over two. How's it going quin man? I'm playing around with some circuit python displays. We basically made a custom build of circuit python That is for this raspberry pi pico w and we added this display to it So that now the display shows up as a built-in display Even though it is actually not built in of course. We have it wired on a breadboard here Um, this was kind of an exercise in trying to add a board to circuit python and in particular adding a board with a built-in display Just something that i've never done before Uh, we ran into our fair share of trouble With various different aspects of the process, but we did eventually make it there And i'm feeling pretty good about it So now i'm just testing it out by drawing some stuff on the display real quick Let's start with that I was going to do four four corners basically with different colors, but Let's see if we even Isn't good here display dot show Main group voucher pass Save it. Yes. That is working. Uh, we have the other Corners are colored in also because of um That is the weirdest green color The green is so yellowy interesting Anyway, uh everything started with zero So that's why actually everything is zero if I do like one and two maybe that would give us A few different colors on the top there. Okay, so let's fill in the other four Corners So that will be let's go zero and then that's display height Go there Actually, we can get by without the last one because the last one defaults to zero anyway. Nice I this line running across if you can see this line, that's just on the protector I haven't removed the protector yet and it has that drawing on it It's fine though Um, but yeah, there we go. That is working using board dot display Which is awesome. That is exactly what I was going for I feel like I've definitely learned a lot. I would say what are the things we learned? Oh, you know what? I want to try actually do we actually need spy Can we get rid of this? and If so, what are the consequences of it? I think actually is the thing too because Like we can get rid of it fine. No problem. I'm pretty sure And then there will no longer be board dot spy But if your user code then wanted to do anything with spy I don't think you could well with the same spy bus. I will say too the raspberry pi pico Throws a giant monkey wrench in the discussion of spy bus Generally speaking because there's actually like two different spy buses and then they're also like somehow pin morphic or whatever they can be on like a boatload of different pins like somehow they Change themselves around inside of there. It's actually really strange the way that works um So like these are the pins we're using for our spy bus. It's technically spy one You could use like this is a spy one pin. That's a spy one pin These down here are spy one pins There's like a whole nother set of them that we're not actually using That technically go to the same bus even though they're on different pins Okay, how that works, but anyway So on the pico It's kind of unique in that you could actually just use the other spy bus. I suppose Uh, but if you wanted to use the actual one that the display is on, I'm pretty sure That we would actually need this in order to Let the user could be able to access it. I wish this had tab complete for the files In the root that'd be pretty sweet Might not know about the files. I guess though Reminds me of the old windows logo. It does. Yeah, the the four corners. There does look a bit like the windows Like it does not I don't know how long You have been tuned in quinman, but I will be wrapping it up here in just a few minutes as well Getting towards the end of the stream here Um, I'll be back tomorrow morning at 10 a.m. Central time if you're interested in similar circuit python development related content Go perfect So then the difference this time is that we don't have spy But I'm pretty sure that that means that we could not Use the spy bus because if we tried to initialize it I don't have the old code though This remembers it doesn't We try to do something like this It was said gp10 and 11 and actually have the right stuff in it It's weird. I don't know where the uh No, why it's not it doesn't have the rest of that stuff Well, anyway, pretty sure it was gp10 and 11 Just quick question. Why do you have a tab with a cam showing the device? Instead of looking directly at it Um, just so that I can show it on the stream mostly um Yeah, I mean for myself, I can just look down right at it and that's totally fine But if I want to be able to show whatever's on this display to You and everybody watching the stream, then I need to try to get it onto my screen somehow. Well, that's the easiest way Um, I could probably feed the camera into obs and do it that way, but I kind of like it this way where it's just a It's just a browser tab essentially and I can just go back to it And I already have my screen share and all that stuff set up inside obs anyway, so When I pull it up here, then you guys are able to see it as well We just default that to none on the last one there So I'm pretty sure this should fail So that would be probably the next the next thing to test on this is When we If we put spy back like this Then are we from user code able to look up the board dot spy and use it to connect other things? Um I don't really know what else I would connect. We'd have to have a sensor or something that would connect over spy honestly, the majority of the things That I use our Displays, I guess there is the uh, there's the sd card. That's probably the easiest way actually That's probably the way to chat to test this Is the sd card reader which I forgot about so Yeah, maybe I'll maybe I'll try that out tomorrow, but like I said before I'm not a hundred percent sure Um, well, I'll be working on tomorrow just yet, but that could be that could be something to try out Anyway, I think I'm gonna call it there. So thank you for watching everybody. Um, thank you for sticking around, uh through the struggles. I Apologize if I was a bit grouchy there for a little bit in the middle. Um, it's a bit frustrating having some Things go wrong, uh one after another after another, but we did make it through. I'm feeling pretty good about this I definitely learned a lot. So I'm happy that I powered through and got it solved Thank you again. Huge thanks to near doc. I probably would not have figured out the fetch sub modules thing without near doc's help Uh, which I am very grateful for Thank you everybody for watching Um, I hope everyone has a good night and a good weekend and all of that stuff and I will see you around Uh tomorrow if you want to catch the stream. Otherwise, I'll be back probably for a bit on monday Um, and certainly back around next friday for a deep dive next week. So until then. Uh, see you later everybody Thanks for watching