week's episode. Thanks for joining me. Also thanks for people who have funny daylight savings time switches that are not the same as the one I've got. Andy Callaway said that this show is on an earlier, an hour earlier today where Andy is. I don't know where that is but yes hey here we are. Thanks for stopping by in our chats. I see you over there in the YouTube chat. Johnny Bergdahl hello, Dave Odessa. Thanks for stopping by there and for everyone else if you are somewhere that doesn't have a chat that looks very active such as Twitch or something like that. That is our Discord server so you can jump over there and look for that live broadcast chat channel and join in with all these good people. Hello Liz and Paul and Johnny is also there and Jeff. Thanks for stopping by. Sorry if I missed anyone. Tea Curry in a hurry. Maybe here. I'm not sure but that is at Adafruit.it slash Discord. Adafruit, stop right there at the U.it. Let's see it's Adafruit but with the dot moved up a couple characters. Adafruit.it slash Discord and jump into the live broadcast chat channel to hang out. Hey you see Grover nice to see you. It is a packed show. We got all kinds of good stuff. So what are we going to do? We've got a discount code for you so that you can buy stuff in the Adafruit store for 10% off. I don't have a batch of Raspberry Pi's to unleash like Lamor and Phil did but they did that last night on Ask an Engineer and that's how they're planning to do that for a while. So if you want to get in on some Raspberry Pi 5 action you might want to watch the Ask an Engineer show on Wednesdays we get batches of about 150 or so at a time and last night it was the 8 gigabyte version the week before it was the 4 gigabyte version. What are you using yours for? I haven't really looked into the Pi 5. I'm sure it's lots lots faster. The 4 and the 8 gig that's that's a ton of memory. What are you doing with them? These are no longer $35 computers that are very very slow. They're a bit more expensive but they're way way faster. What are you using yours for? I'd like to know. What else? I've got a one-minute excerpt from the product pick of the week show on Tuesdays to show you so you can see what what was up this past week if you missed it. By the way that discount is only good during the show there's no discount code for that it's just the price drops during that show. Also because Phil and the Moore mentioned it last night if you're watching these shows on repeat you may have missed on a lower price. We don't do rain checks and things like that and back orders we don't take money before we have something so if it's a if it's an offer that's only happening during a live show that's that's it that's how that stands. Cool GIF there from Yanisku 7 looks like some pokeball hatching going on. That is relevant to our show today as I'm sure Yanisku 7 knew. What else? I've also got a circuit python parsec to show a cool one a really interesting one something I have just started to play around with that you may be interested in as well it involves Wi-Fi which is short for wireless fireless I think. Davo Dessa asks over in the YouTube chat still no job vacancies segment that's correct yeah I believe we took down the jobs board to do some tinkering with it and re-envision a jobs board in the modern era we have not done that yet so we currently don't have a segment on the jobs board occasionally we've had some positions open up at Adafruit we've posted those during shows but there is not a general purpose job board right now we will let you know as soon as there is and maybe ask on ask an engineer because I don't know but if you want to ask if you're able to during the live show pose that question in one of the chats and Phil and Lamar may have an answer to what's the plans there. Coffee cup warmer is the is Jeff's and Sea Grover space heater yeah these are ideas for how to use the Raspberry Pi 5 it's just a heat stuff it's a roundabout way to heat stuff but hey I'm here for it what else so I've got a little kind of gear report kind of thing I want to show a little repair kit that I'm putting together to send to my son whose electric guitar is having problems and I'm not around to fix it so I'm gonna send him a little kit I want to show you what's in that I've got my pokeball project that I want to show you and I'm gonna actually make it a little wider cast a wider net and show you a little bit about setting up the GP2040 CE this is the game pad firmware for RP2040 based microcontrollers I'm gonna show you I think I'm gonna do something dangerous I brought a Raspberry Pi Pico H fresh in the bag still in the electrostatic foam I'm gonna attempt to flash that from scratch so you can see what that process looks like and then I'll have a nice video record of it as well for when I forget I can go back and watch this and I'll show you how you can set it up both as just a game pad for use on different systems how to specify one particular system how to adjust things like which pins are gonna press which buttons on the system that you're using as well as setting up advanced topics like macros and a macro is or a turbo button both of those are somewhat more advanced and those are what we're gonna use for the pokeball project today alright let's get to it so that right there is your coupon code if you want to head over to the Adafruit store if you want to throw some stuff in your cart if you want to look for the coupon code box I know this is a lot of ifs and if you want to type something in there that will save you 10 percent then that's the thing for you right there gotta catch them all gotta hyphen catch hyphen hyphen all type that in just as it is right there I didn't use the little apostrophe in front of the mmm like Pokemon does but gotta catch them all that will get you 10 percent off in the store today if you head over to the store just go to adafruit.com you can browse through there's some new products listed here I got my fonts all big because I'm gonna be showing some stuff in the web browser so not a lot fits on the screen right now here's some new featured products such as these round displays those are wild rp2040 well if you want that to be 1495 minus 149 150 maybe we round up then use this coupon code because it's good for 10 percent off you can also click up here in the top on the little hamburger menu and head to new products let me show you some new stuff that's out this thing looks cool this is expressive box 3 esp32 s3 box 3 I have not gotten one of their earlier ones they they were out of stock for a while and I missed them but that one looks pretty cool so it's a lot of a lot of stuff packed into a box there so that one that's no good for today so why am I talking about it but any of this stuff any of this new stuff you want if you want to also click up here on the hamburger menu and go to featured products we've got some things there that we're promoting and saying hey these are cool go get some 10 off and while I'm here on this featured I'm just gonna delete part of that and type in free here are some offers if you not only we got the 10 off with that got to catch them all coupon code right there at the bottom but if you spend a little bit more of your hard-earned money if you spend $99 or more you will get a free PCB coaster this Adafruit logo PCB coaster with the gold logo comes with four little rubber bumper feet adhesive feet to stick to the bottom great coaster I use it all the time you will get that for free for $99 or more spend in the store for orders of $149 or more you'll get a kb2040 that is our pro micro pinout size shape rp2040 based board it's super ideal for keyboard and macro pad projects it is also excellent for game controller projects like I'm going to show you today however I'm using a pico on it but that board will work identically you can use you can use the kb2040 for those kinds of projects so if you spend $149 or more you'll get that and you get the coaster for free if you spend $199 or more you will get free ups ground shipping in the continental united states as well as the kb2040 and the coaster and that's not all if you spend $299 or more you will get a free circuit playground express and the kb2040 and the ground shipping and the coaster all of that for spending a bunch of money but if you just want to spend a little money great and spend even less by using that coupon code right there got to catch them all that's our coupon code for today it is good until midnight tonight east coast time I have no idea what the different daylight savings times will do to people okay let's see uh next up I've got my show that happens on Tuesdays it's this thing right here it's the product pick of the week on this show I like to give you a little bit of a uh a demo and a highlight of the features of some cool new product or an oldy but goody from our archives and give you an enormous discount on it uh this week was one of the 50 percent off discounts which tends to be the case if it's an ate a fruit product we're able to cut some of that uh cut some of that off the top and give you it for 50 off retail um the shows usually about 15 20 minutes on Tuesdays this count is only good during the show like I said before but I do like to do a little bit of a recap just as a way to show the demo on it if you're curious later so here is this week's product pick one minute version take it away me it is the 2.8 inch tft touch shield version two with resistive touch as I touch the screen we're registering x and y coordinates and that final number there is the pressure this is being used as a sort of slideshow display the touchscreen is just being used as sort of two directions so if I touch over here on the right we're going to go to the next image if I touch on the left side of the screen we'll go back so this is a really simple primitive use of the touchscreen you can use something like a user interface that has some big buttons on it maybe four buttons five buttons on it that are big touch areas and that'll work great that right there is my product pick of the week this week it is the 2.8 inch tft touch shield version two with resistive touch screen for Arduino and metro shaped boards and I like that there's zero indication on that video that it was on Halloween so in the future I will have no idea why Lars was dressed up in a scary baby doll mask and I had a Viking helmet that's fun uh so yeah someone noticed Lars is back there with some Pokemon he's actually eating some Pokemon cards um good for Lars he didn't get any candy for Halloween so he's angry let's see next up okay here we go so this is a pretty cool I'm gonna do a little setup but this is a pretty cool newish thing something I haven't played around with before for the circuit python parsec so here we go check it out okay here we go we're all set up so for the circuit python parsec today I wanted to show you the circuit python web workflow this is a workflow particularly for esp32 based boards that allows you to deal with files and code on your device wirelessly so you can see here I have a metro esp32 s2 express it is plugged into a big usb battery bank it is not plugged into my computer so there's no data coming through wires but this has wi-fi on it and one of the amazing things about the the web workflow is that the setup is dead simple if you take a look here in my browser this browser is using a web server that is running on the board right now to serve up this code editor if I click on open this is the file system of the metro so that's showing me I've got my settings dot toml file my code my libraries the boot out text I'm going to click on this template settings dot toml file it's a fake one so you don't see my credentials my actual ones but all you need to do to make the web workflow work is have a settings dot toml file on the board with your wi-fi router ssid and password filled in that will automatically cause the board to try to get on wi-fi as soon as it boots and set up a web api password i'm just using a default here password with a zero if you set that file up on the board then the next time you reset it you'll be able to go to a url that's simply circuit python dot local so let's do that from scratch i'll go circuit python dot local hit enter it finds the board and then it allows me to do things like go to a file browser go to the full code editor or go to a serial terminal so let's go to the file browser and I may have broken things so let me I'm going to hit reset on this board right here so right now it's going it's trying to find the wi-fi which is really close by a hub right here so hopefully it'll find that uh now I'm just going to yeah okay so this has this is refreshed now it's just acting a little slow so if I back up a page here is the device info tells me what board it's on the version of circuit python I'm running the host name and the ip address that it's been assigned on my network now I can click on a file browser and go look at the files that are on the board we can also edit those files right here in a sort of a bare bones way or we can go to this full code editor so this again tells me a little info about the device and go ahead and close that and now I can do things like open up the code dot pi file when I open that I'm now dealing with your typical code editor for circuit python this is just bringing in a neopixel library and you can see here when I adjust the color I can save that code and I'm just hitting command s on my keyboard and now I've changed the color to blue I can go ahead and comment that code out and do something a little more interesting here so now I'm going to save that file it is going to restart the board and now we're doing a little rainbow color display of the neopixel on the board you can also check out the serial editor if you have serial output and get right to the REPL directly over wi-fi so you can imagine this is really useful for projects where it's not easy to access the board you've got it hooked up to power maybe it's a solar thing you don't have an easy way to get a usb cable and a laptop into it as long as you are within wi-fi striking distance you'll be able to log in with the web workflow and code your circuit python right on the board no wires involved and that is an introduction to the web workflow in circuit python and that is your circuit python parsec how about that huh I had not used it before so one of the things I love about doing this show is it gives me opportunities to stretch and grow and find areas of circuit python that I haven't touched before and that one was absolutely new to me I know Scott had been working on this I know there's actually an excellent guide that melissa put together if you go into the learn guide look up circuit python web workflow code editor quick start this will show you how to get started but really the the beauty of it is as long as you got circuit python on your board just the latest release version will work and you put the proper credentials into that settings.toml file the rest just works it's just built into the system oh that's cool Liz says that she's been using this for the wall mounted matrix project works awesome that is so cool very good to hear web workflow is stable enough for a parsec tyeth says yeah I think so it worked it worked pretty well I just had the one glitch there that may have just been me not being patient enough for it to to load up that page but it's pretty cool and I have not tested this but I remember Scott showing this and you can see in some of the menu items there you can have I believe multiple items in this mode Wi-Fi on the board and pick the board you want to edit so you're not stuck to just one board it'll it'll allow multiple boards to show up and you can pick the individual one you're using which again could be great for installations and other projects where you have multiple devices that you can't access easily all right so let's let's jump over to this one actually this this next thing hi Keith Keith just showed up over in the YouTube chat welcome for welcome to the show thanks for joining us so maybe relevant to Liz who's a guitar player I know and a musical instrument tinkerer so my son has a couple of electric guitars one of them has a pretty janky output on it so I fixed it for him apparently I didn't fix it well enough because it is broken again it's I believe just the ground wire on it has has a cold solder join or something like that it cracked so he asked me how the heck does he repair this he pulled the back plate off of it and it's you can see in there okay there's really just a wire that needs to be soldered so he doesn't have any of the stuff to do that though he's off at college so I decided I want to put together a little kit of stuff for him and this is what I'm putting together to send him so I have this battery powered soldering iron that I rarely use and so I'm going to send that to him this thing is pretty cool it takes for a double a batteries it'll use alkalines nickel metal hydride are the best for it but I've got some some fresh alkalines in there I'll send it's detached from this and try to get that back in there here we go it has a nice safety on it while this cover is on you can't flick the thing on so you remove that flick it on and you can see this little red led lit up about 30 seconds it heats it up and it's ready to go and really he's just going to do maybe a little bit of desoldering and a quick solder so I think that's that'll that'll work well for him and keep it simple he doesn't have to worry about a big soldering setup and then I took one of these little parts PAL boxes Adafruit parts PAL I've had a few of these over the years and I've rated them for parts enough that I had one that was mostly empty so I grabbed this one and this is what I'm using it's a nice little container you can see I snipped off a little bit of the copper scrub for cleaning the tip just so he doesn't use this thing once and then it's ruined because he never has cleaned it so I'm going to encourage him to use that clean that off I've got some solder in here this is lead based solder 60 40 stuff because that's a better bet for this soldering iron versus the the no lead so I'll tell him to be careful about that not lick his fingers I've given him a few little pieces of heat shrink tubing here to go along with that I actually cut a few lengths of some silicone hookup wire and pretend them so depending on what he's dealing with these may come in handy I also gave him some solid core wire if that's going to be easier I put some zip ties in there just so he has zip ties they're often a good solution for some strain relief or keeping things from disconnecting and then just depending on what this setup looks like in there I gave him a couple of options for quick connects wire quick connects that he can try out these are these little crushable ones so I believe there's going to be a wire that's that's detached that he'll from one end that's still on the circuit ground that he'll be able to plug into here one of those pieces of silicone wire squish that down with some pliers and then solder one of those ends back to the to the terminal so that is the little guitar toolkit let me know if you have ideas of things that I should throw in there I don't think he's looking to replace potentiometers or switches it's just this one issue he's got of a of a fuzzy line out on the guitar so I want to try to help him with that maybe I don't know some sous-grew or some I don't want to send him a hot glue gun I don't know what else he'll need in there I think he's got screwdrivers I may send him a little set of needle nose pliers and a set of diagonal end cutters but anyway that's that's the the repair kit that's going off to college to help my son's electric guitar get back into working order so what say you chat what am I forgetting let's pop open the chat in fact oh do I have moray patterns happening on the shirt is it I bet it was when I was a little further away solder braid extra flux those are good ideas I'm gonna I think I have a feel like I had a solder braid a little coil right here I will put that on top of it just to remember good idea there's some solder braid I don't think I'm going to send him replacement parts they must have a shop in town where he can get a a replacement quarter inch jack if he needs it um let's see there was a question in the chat going back about is the web workflow just for ESP 32 yes it is expressly for ESP 32 boards I should have said that um ESP 32 boards that can run circuit python so you can I believe shoe horn it onto boards that are sort of original ESP 32 or ESP 32 Pico as they're confusingly called the the updated versions but better for s2 boards s3 boards ones that have a usb interface so that you can get the actual circuit python firmware on there in the first place that makes life a lot easier so yeah this learn guide will show you thanks Todd for fielding that if you check out device setup this will tell you get your circuit python on there create your settings toml file what you need to fill in in there by the way thing I didn't mention you can fill in the web api port if you don't want to use the default port 80 and the web api name so you can have the device show up as a specific name which is good if they're just named circuit pi drive they will I believe get a unique ID so they don't clash with each other but if you want to name some devices specifically you can let's see here why so study snacks are very important yeah we've been sending snack boxes for sure that's a good thanks andy calloway said it yeah never forget the snacks and money oh Todd too so tithe says that sorry I'll bring the the chat back here tithe says that the pico w may be able to do the web workflow oh I didn't know that does it run on some of the rp20 40 boards that would be cool yeah I'll dive into this more because it's it'll be great to have it running on the pico w as well okay so next up here is the thrust of this week's project which is pokemon on nintendo switch and there are a few games this will work on there are quality of life hacks and mods and convenience things not really I wouldn't call them cheating but these are things that you can do if you're playing a game like pokemon shield or pokemon sword or some of the newer ones on switch I have shield if you are obsessed with collecting every darn last rare hard to find or evolving really rare difficult to evolve pokemon characters which if you're not familiar with the game pokemon I think originally stood for pocket monster little weird creatures sometimes big weird creatures you collect them they become your stable of fighters and then you go and battle other pokemon it's it's um it's weird but very popular and some characters can be difficult to find such as one's called shiny and they have a little sparkly animation on them I believe in shield it's over the odds are something like one in four thousand times that you encounter a pokemon in the wild it'll have this little glitter on it and people want to collect those so there are mods that up your chances of encountering pokemon in the first place up your odds of evolving them in a certain way up your odds of finding eggs of a certain kind and some of these mods or some of these hacks they are just taking repetitive tasks and making them easier so the one I'll show you that I've set up and I'll show you how I've set it up makes your character spin in circles and if you use the analog stick on the switch and spin your character in circles about four times or so they will do a pirouette on on one toe character does pirouette I won't do one in here do I have the space do one one pirouette they'll do pirouettes and as they do them this I believe has the egg hatching process increase its rate so you can make things happen faster you could make this happen just by being patient enough to keep spinning that thumbstick because once you spin it the character will do a few seconds of pirouette and then stop if you keep spinning it the character will keep spinning so rather than have you you know scroll your phone with one hand and and do circles with the other what people have come up with is controller modifications and sort of usb dongle man in the middle attack kind of things that will perform that action for you so it's an action you could perform with a controller but we are going to automate it and so the way we'll do this as I mentioned before is with a pico w sorry a pico h just because it's got the pre-soldered headers it makes it easier to put together but any pico will work in fact nearly any rp2040 based board will work including kb2040 and all I've done is house that inside of a little cheap plastic pokeball in fact this is me returning the favor my son got me this pokeball in little tokyo in in the summer so he gave me that so I'm sending him the guitar toolkit and so what you can see I have in here is just a pico h with a usb cable that's coming out of this coin slot which I just widened a little so the cable would fit so it's usb micro b on one end and usb c on the other and that is what external controllers plug into the switch over the there's a usb c port and then you can see here I have a couple of those header pins jumpered together with just a big long silicone jumper cable but anything you want to use to jump for those together it has the effect of pressing a button so you can use most of the gpio pins on the board as an analog for the different buttons on your controllers if you look at the switch here we have the abxy buttons we have the d-pad buttons we have the start and select buttons we have analog sticks we have l1 l2 r1 r2 so there's a bunch of buttons and you can by default those are all mapped to different gpio pins on your microcontroller so all you do is short one to ground and it has the effect of that button being pressed now the reason this exists in the first place is people like to build their own uh fight sticks and other controllers joystick based or button based uh fight game controllers and map them to the pins on that rp2040 board and then run over usb to their console or their pc so this gp2040 project and let me show what i'm talking about here uh this is the uh open source community led firmware that's used to do this type of project and you can see here it it advertises itself as a game pad firmware for resrep apico and other rp2040 boards combines multi-platform compatibility low latency and a rich feature set so this is compatible with pc games uh with i believe with mac games uh playstation 3 playstation 4 the nintendo switch uh a bunch of different permutations of xbox because it uses both x input and uh what is a direct input uh so there's a there's a couple standards there that work on pcs and the different xboxes um and so there's a really sophisticated firmware uh under the hood written in c that is able to do really low latency like one millisecond uh or less it says the overclock pulling rate is less than a millisecond of input latency in all modes and this is critical in in doing these type of game projects um and you can tell it hey you're going to be a switch controller uh or you're going to be a playstation 3 controller and you can do that in setting up your configuration file for the board which is how we'll do it or you can even have a certain pin that will allow you to change which mode you're in on startup so you don't even have to pick if you have a general use uh joystick you're building uh but in this case we're going to we're going to force this thing to be a switch controller so let me give you a demo uh and this is you may have seen this if you were uh on if you watched show and tell last night i'm going to do a similar demo here and let me just i'm going to turn off this fan for a second so i can hear a little better and i'm going to take off this shirt because it is super uh high contrast thin stripes which is very uh video illegal so i'm going to fix that okay uh let's take a look here so i've got my switch and i'll go ahead and turn that on you can see here i'm running pokemon shield and this is not hacked or anything this is a not a jailbroken device this is just a regular switch uh and sound isn't that important but you'll hear you may hear a little tinkly sounds in the back so here i'm using the game with the joy cons uh plugged into the sides and this seems like the best way for this if you unplug them or if you try to plug in another controller with hub or try to use the dock some of this stuff is harder so so far what i found is the best way is set up like this which is great you can play the game and then decide okay i want to run my hack so you've set up all of your egg hatching stuff uh or your character evolve stuff and then you want to run this little auto spin mod so all we're going to do is take our pokeball here plug this in it's going to start up and you can see it is automatically rotated that analog stick for us virtually and it just is doing keeps doing it uh it spends six frames in up right down left up right down so it's a pretty fast spin you can adjust timings on things if it's too fast or too slow for what you're trying to do uh and then we've got it in a mode where it just says as long as that button is held down we're gonna run that mod now if we look at what's going on on the pico uh i can unjumper one of the uh sides of this cable here unplug it and it stops and that the nature of this um move is that it doesn't stop immediately but that registered immediately so if i plug this back in it says if i'm pressing that uh macro button again and there there she goes she's off doing her cool spinning now you can also just unplug and the way i have this set up is this is designed for the guide just as a really simple one trick pony it just does one hack that you've set up or one mod that you've set up so you leave your your pokeball here closed up and when you're done you can just unplug from usb no harm no foul it just stops sending it so that starts up it presses and holds its macro button forever and then you pull power and it's done so it's that easy you can see here i said this is what we're doing is just that right so as long as i keep that you can see why you'd want a micro controller to do that for you because as soon as i let go she's done right so that's the point of that we can do similar things on on bicycles so there are it's a lazier circle on a bike so i don't have a macro setup for that right now but that's used for one of the evolution tricks that you can do now what i wanted to do is show you a slightly expanded version of this sort of thing which is adding a kind of ridiculous set of buttons to this setup i have another pico here another pico h this one happens to be plugged into our super cool pico terminal block breakout board that we have in the store on this one you can see i have a little analog thumbstick so that's acting like two potentiometers that i have plugged into gp 26 and gp 27 of the pico i have a button here that i think is mapped to the select button which is on what are you on gp 11 i don't think that's select i'm not sure what that one is and this one i don't remember i don't think that one's registering that might be a a button doesn't actually tend to do a lot in this game until you're talking to someone we're in the middle of a battle so here again just for convenience i've got a little usbc hub i could also just steal that cable and use it here but potentially you could have multiple of these i don't know if that works likely it doesn't so that pico now same sort of thing it's set up to show up as a switch you can see i can now which way is right i can now move in the game with a little custom thumbstick uh and guess what this one doesn't suffer from drift like the uh like the real one which is nice and then if i press this button here uh what button does that is that x okay so that's yeah that's configured as the x button on the switch so you can set them all up this is actually the perfect breakout if you want to use things like big arcade buttons or other other large stuff where you're building a a box and you don't need it to be super tiny obviously that's not going to fit inside of my pokeball there but it is perfect for projects where you want to experiment test stuff out um let me just go to the discord so i can make sure everything is copacetic like looking for messages where people say your mic fell off no we're good uh so um for example on this one i have a spare jumper wire let me zoom in a bit in fact on this uh i have a spare jumper just connected to ground uh so now i can test out some of these gpio pins what is gpio pin two three four i might not have them mapped let's try that one to make sure it works yeah so that one works oh that's funny okay so there's a bunch of default mappings and for some reason i didn't i i didn't set this up with a lot of those so there's a bunch of things not doing anything so that uh acts like this plus button so does that for some reason that whistles uh so you can see you can um there's a chart i'll show you that shows you what the pins map to but you can map anything and when you're testing you can just ground something short something to ground and it'll it'll run that um so let's now i'm going to go ahead and unplug this i'll turn this off uh and then grab this and show you what this setup looks like because once you know how to do this you can build all kinds of great controllers and and uh bend your your console to your will so let's jump over here and yeah we'll use this get that off of my face there snorlax rules says keith okay so opening up the uh pico here let me get that metro get that out of there and let's grab a usb b cable uh so here's how the setup works we if you uh just go to gp2040ce.info uh i'm gonna just paste this in the chats and this will be in the learn guide uh but if you go here you can see there's a little download button and you can see this has been pre-compiled for uh a bunch of different boards it's a uf2 uh based workflow so you can see we've got the pico pico w pro micro a wave share p2040 kb2040 leotris uh and then some other uh open source game pad or fight stick types of boxes but we'll just go ahead and grab the download here for rpi pico um i will hold the boot cell button and plug this in and release that should put me into bootloader mode so i'm not going to show share my desktop as pain but um i should now have a drive on my desktop uh called rpi uh rpi dash rp2 and that is the usb drive in bootloader mode waiting for a firmware to be dragged onto it and so i'm just dragging that on oops where did i drag it uh so it's copying over just the same as copying over a circuit python uh uf2 or a pre-compiled arduino uf2 same sort of thing um it is uh copying and then it restarts the board uh and the board is actually ready to go so it is immediately in uh a default mode with some default pin assignments and i think it's going to show up as a direct x uh a direct input uh device but we want to go and deal with some configuration so we can turn it into a switch controller uh so what i'm going to do is grab a jumper wire and uh all of the info in here by the way is is uh available right here in this um in this page so this was the instructions for installing the firmware i just did all that and then if you go to usage uh it'll tell you okay by default this thing is going to use these um button assignments and there's the sort of generic uh button name button one two three four left one left two right one right two start select uh and those map to different pins on different boards so for the pico or the rp kb2040 it might be on different pins so there's a wiring diagram you can look at to figure out which those are um and then it'll tell you in terms of the different systems what button that that presses so since we're interested in the switch um we're gonna look at that uh column right there the way to get into this configuration mode is to essentially be pressing the select i think it's select or start the start button while you plug it in so i need to find out okay what pin on the on the rp2040 is going to be this uh start or s2 so um the wiring diagram here let's see if i can make this a little bigger so we click on this little wiring link here uh you'll see here's our um our pico get a little closer there and focus uh so there's a pico and if we look in the wiring chart gp17 which is the second up from the bottom on the right here is the start button so if that start button is pressed when this gets power it will go into this configuration mode so what i'll do is i'll go ahead and unplug this and i'm going to plug in pin 17 and the next one up happens to be a ground pin so now when i plug it in it's as if i'm holding the start button now i can unplug the uh either end of this we don't need to hold the start button forever but what it has just done is it has initiated a web server on here that's kind of a theme today is the little boards initiating their own little web servers and i can go to a uh url or a yeah a url that should be listed right here in this web configurator section 192 16871 so let's open that in a new tab and here we are so that's the little web server configurator running right on the pico itself serving it up over the uh usb to the machine here uh so this will tell me the name of the board and some other stats about it and now we can go into things like settings so settings i don't want to be picking my input mode on startup which is definitely possible i just want this thing to be a nintendo switch controller so i'm going to pick nintendo switch um let's just hit save on that and it said please reboot your device and i can't restart your device i can't remember uh i haven't tested it lately if i need to restart after i move after i save before i move on to another page just to be safe i will so i'm going to click this big green reboot button i'll say reboot the board and now we can kind of soft config uh soft hold that start button so we're telling it start up in web config modes i don't have to rejump her it uh so now i can go into uh different configuration pages these are the default pin mappings so the pin numbers here are the rp 2040 pins the pico rp 2040 pins which is great so i can just look at those and say okay um remember like s2 was pin 17 so there it is listed you can change them in here if you want uh we can test something right now so let's test out um how about what's going to be a good one to test uh let's just try stuff so i'm going to grab the switch and i'll grab a usb cable this thing is basically ready to go from the moment you put that uf2 on there uh and then it's just a matter of configuration so we can unplug from here so that means i would lose that server if i um i've lost that server i would lose that page if i restart or refresh that that page and let's zoom out a little bit here turn this on okay a that would be a good one to test right so the a button what's the a button uh i think a button is button two um just because of x y a b b a uh nintendo direction of things right to left to left to right so i believe that's b2 uh however we want to check we go back uh to the docks here look at wiring uh it says b2 is pin seven and on the switch b2 is a right uh so i can presumably jumper pin seven uh and each time i touch it it's like i'm pressing the a button so let's let's wake this up uh oh gosh which one to use pin seven i need to look at the chart here with no silk screen so i can see unfortunately are they on the bottom on this one i can't barely see that all right i'm going to check the chart sorry and on this it's a matter of finding a ground pin and then counting so that's a ground pin right there so it's two below that so let's turn you on okay so now it thinks i just pressed a i want to press three times oh i pressed it three times probably just by debouncing problems uh and now it's it's ready so if i want to um let's say go to this menu here i need to press the x button so same sort of thing you'd find out okay a b x y i think that's going to be button uh four no yeah four so that's gp 11 so that's two down from this ground pin there we go we've brought that up uh so easy to easy to just test it out that's a good thing to do at that point i'll go ahead and unplug this for a moment let's turn that off and now let's go back and look at the macro configuration uh so this is this gets pretty pretty cool the stuff you can do so uh again i want to be in web config mode so i will go ahead and jumper pin 17 you can leave that jumper it's just like you're holding the start button it doesn't mind uh but i'll unplug it just so i don't forget and leave it in that mode okay so now if we go uh into our web config you can see a couple of cool places to check out our add-ons and configuration and macros so we'll go to macros first uh so the way this works you need a button that's unassigned that you can say is going to be your macro button um so this is this is like an extra button that doesn't exist on a uh a controller so you something you wouldn't map um this is kind of like if you think of third party controllers that have a turbo button or some other special function modifier uh if you go back here you can see all right the the the free pins if i just had defaults are gp zero and one those are normally used by uh this software as the OLED pins uh for i square c OLED displays i'm not going to use that so i could use gp zero or one as my macro button uh or i could come over here to the other side of the board and grab uh any of these over here i'm going to do gp 22 it's not used for anything uh so we can go to the macro setting and say okay the macro button is going to be macro button is on pin 22 i'm going to enable macros uh enable board led is on by default what this means is it's actually going to use the on board led if the board you're using has one uh and it'll blink when a macro is being sent which is a nice verification depending on how you have things set up and now we have a choice to make do you want to just have a single macro on here and when you uh short this pin press this button flip this switch however you're activating it run just one macro that you care about or do you want the macro button to be a modifier for any other button so you could say okay if i hold down the macro button and press a that sends one macro b that sends another macro c that's a different macro you can imagine you can get a lot i think you can get up to 50 macros uh made on here uh you probably don't have that many buttons to do it with but it's possible uh and i think each macro event can have something like 18 steps in it or maybe it's more i can't remember but it's in the docks uh so let's just do the macro button is pin 22 on its own it doesn't act as a modifier so i'll go ahead and activate uh that this first macro and this is you can see here a series of macros and then we can give it a label just for our own needs it'll store that and come back so let's say um auto spin so we're gonna this is setting up that automatic spin of the character i'll try to make it look a little different so that it's slower and doesn't actually get to the pirouette how about uh is it interruptible is it exclusive so we'll turn off interruptible and that means that it will uh run its full length anytime it's pressed regardless of what else happens uh and we can also set it to be exclusive so that you can't do other button inputs along with it and and this is a choice depending on what you're trying to do uh for some reason i decided i like looking at the frames as the speed rather than milliseconds um but that's gonna just give you different numbers different uh scales of numbers to type in and then we're gonna add our first macro item by pressing this plus sign here so this is how long it it registers as being pressed and one is pretty darn short i don't think we need any macros to be that short i think i did minus six frames initially that it's held uh you could do more you can also set up pauses between events between each step so now you're just telling it okay what button of the controller are we pressing uh as the first step of this macro so let's do uh how about up and then we'll add another one we'll do 10 frames of right do another one 10 frames of down and left remember to say 10 uh so you can imagine this would allow you to do something like the kanami code with one button or a fireball in street fighter with a single button um without having to go through the the actual half circle and then right uh so if there are things that you want to pull off in a game that you just don't have the dexterity for uh this of course could also be used for assistive controller needs if you just want to simplify stuff and have a single button that does a special without having to do do all of uh all these movements and difficult to remember combos that's that's one way this can be used um you can see here by the way um you can chain together buttons so this can be multiples pressed at once so if i say i want up and be one at the same time you can you can do that uh if we say none it'll get rid of that one so you can stack these so these can be like a multiple button press uh and then if you want some time after the release so we're going to hold for 10 frames of of game clock and then release and then immediately press the next one if you needed spacing between them after the release then you can set a number of frames over here on the right okay so this should be our first macro uh i'll hit save on this i'll go ahead and reboot the device in web config mode so i can make one other change um i know in fact i'll leave it like this so this is kind of interesting in the uh pokemon game on here up down left right don't do anything when you're just in character walking around the world mode you use the analog stick um so if i run this macro right now we can actually see it working out in the menu the main menu of the switch i think does use um the d pad so let's go out to home here uh or if we use any of the the classic games like game boy advanced i think those would use the d pad let me refocus okay so we can test it with this is the d pad on this right uh so i'm going to go ahead and i'll reboot this in controller mode unplug it and now we'll plug it into the the right cable go i have so many similar looking cables that i've been using here's one are you one yes so plug it into the switch uh i just won't do anything at first because i don't have it shorted no jumper permanently attached uh this is what i say pin 22 and i believe let me check my chart that's the one right below a ground pin pin i really wish these boards were bigger and had a easy to read silk screen but they don't so uh there you go okay it's above the the ground pin on the the second ground pin on the right all right so i can barely see you but i think you're that one did it work i said i said macro button i'm going to say enabled activated press not interruptible use the buttons okay this should be working but uh one sign is i'm not seeing buttons blink uh the led blink so that means it's not trying to send the macro wait i just want to double check that one it's above that yeah above ground is pin 22 we're plugging it in nothing all right let's let's plug it back into the computer and see but this is the testing uh dance that i've been going through so this is real world accurate uh just because i'm not able to test it on the computer since we're sending switch specific stuff okay so let's let's double check that this actually yeah so this is plugged in and showing up so go to macro uh macro button is pin 22 it's activated i'm not telling it to use specific buttons which is what it would require for the modifier thing uh you know what one thing i want to check i'm going to tell it 22 even though i'm not saying uses buttons i can't remember if that was actually a confusing reality of how this works so let's reboot this web config let's unplug you back into the switch yep okay uh so that worked this time so i'm glad i did this because i'll make a note of that in the guide you do pick the macro button number uh so here when i press this it goes upright left down one two three four now the reason this won't work in the game we go back to the game get up there or it won't look like it's going to work in the game is because this d-pad doesn't do anything in the game it's all got to be analog pad all got to be analog pad so that's okay we can go back to the gp 2040 c e config and tell it that the d-pad is actually a fake analog pad which is so nice that that feature exists so otherwise we'd be in trouble uh we would need fake analog like digital potentiometers or something going on pkary and hurry us what are you using for usb c to micro b this is a usb c to micro b cable i think it's from a to fruit we have a one foot and a three foot length this must be the one foot length i've also successfully used some micro b that's not one of them but i've used i've used some micro b to a with a to c dongle i don't think i have one right here that hub would work as well this i don't think this one worked for me but i had a a little anchor hub over here that was usb c with usb a so i've all in the guide i'll show a couple cables that'll verify work so okay now we're we're back in config mode and if i go to settings you can see here d-pad mode conveniently doesn't have to act like a d-pad it can act like a fake analog and what these do i believe is they just send like full value in one of the one of the directions of the two potentiometers so we're saying act like the left analog that's right yeah peaker you don't have to make a cable which is nice you can you can get a usb c to micro b cable thankfully so now i'm changing the d-pad mode to left analog i'll remember to save always remember to come down here and save do the paranoid restart i can unplug that there uh then i'm going to go back to configuration macro and instead of sending up down right left as d-pad it's going to send them as analog so that all happens just on that settings file but now let's make this slower so i said um i don't want to spin in a tight circle this might work on the bicycle actually i think it needs a lazier circle um it may also need a mix i may need to send one line that's both up and right at the same time that should work there are some settings to avoid sending right and left at the same time because that's impossible or up and down at the same time it's impossible it's because in some fight games that can cause a block on both sides of the hitbox which is no good it's a real cheating kind of thing so there are ways to prevent that from happening okay so we're setting these to to slower um maybe let's make them even slower let's say 300 milliseconds and again these will be sent as analog this time come down here and save reboot sure unplug turn on the switch right of focus sorry and like you and it doesn't matter if this is plugged in before or after um the switch turns on which is good okay so now we're gonna gonna try to find pin 22 oh it didn't do anything so it thinks it's sending the macro but for some reason oh it's okay what's she doing she's just running in a square she should go up now why is it so slow oh it's 10 seconds isn't it is this a 30 frame a second oh yeah I guess this is a 30 frame a second game oh and it did it just once right so let me uh move back over here let's just get out of snow in fact it's somewhere a little nicer do do do do do okay so let's see so we're getting like 10 seconds she just ran into a barrier so she can't go but she should come running towards us for 10 seconds I mean it's five seconds maybe this is 60 frame per second game okay so all that's super interesting uh interesting findings what I want to do though is show you how to get that to repeat endlessly I'll also tighten up the the timing on that so again I've got uh start button pressed plug this back in uh and back to macro so let's make these shorter uh what is this oh you know yeah let's let's show milliseconds yeah that was five seconds is what I was doing basically so what is let's say 0.3 will that let me type 0.3 am I a milliseconds no three mil okay three milliseconds what's that in frames 0.1 frame okay uh let's do let's say nine frames and now I'm going to change the behavior of the button so you can do press you can do hold repeat or you can do toggle so toggle would be great if you wanted to like hit a button it does the thing over and over and over and over again and then you hit the button again uh for this since I'm just doing set it and forget it plug the pokeball in and it does its thing I'm never unplugging it I want hold repeat so as long as this button is held this virtual button is held it's just going to do the thing so we'll hit save close that get in to the switch okay so now let's go right here I'm gonna oh good so yeah I got it I got it to be just long enough uh in each direction that she's not doing the spin so there that was my goal was to show kind of a different thing um but now it runs forever as long as that button is pressed or that uh pin is jumped so I can unplug that stops plug that back in she goes and you can see we get the the little led uh lit as long as the macro is running macro stops so the last thing I wanted to do was just look at the add-ons on here uh the only add-on I'm actually using is onboard led just because I wanted it lit all the time so let's go back in macros here I'm gonna disable this enable board led because it clashes with the add-on I'll save I'll reboot probably out of paranoia and then we'll go back to settings and sorry go to configuration add-ons add-ons configuration so this is kind of cool we can do things like this really advanced beautiful firmware we can do things like boot cell button configuration we can say hey you know what I want the boot cell button to actually act as one of my buttons uh let's we can make it uh how about b for that x button and onboard led config we can say I want mode indicator and the docs talk about this mode indicator is basically is it acting as a controller or is it in uh config mode or rather yeah this this configuration mode where it's serving up this page uh and I think there's a third thing it can do but this will basically just light it up when the board is functioning properly plugged into your game controller or or um other device that uh that this is supporting uh analog you can turn this on if you want to actually use potentiometers plugged into any of these analog pins it tells you which pins are available which is cool I'm not going to use that turbo if you just want to set up a turbo button so again a modifier on a button or I think you could just say my a button is always always on turbo um you can set that up here uh and on and on and on including display setups tilt inputs buzzer speakers this socd cleaning mode is is how you say we're not allowed to press right left at the same time kind of stuff and how it how it prevents clashes there uh and on and on there's this ps pass-through thing I believe is if you want to try to use this on a ps5 you have to have a legit ps4 controller plugged into a usb host on the board or something like that so it sends some encryption I've not tried that at all but it gets wacky I'm not sure what the we extension does SNES extension does um send uh SNES uh shift register style messages which is cool uh so let's just save this with the boot selection button should act as x uh and onboard led so let's save down here at the bottom saved restart I'm rebooting in web config mode so I believe it'll slow blink so we can tell we're in web config mode uh if I unplug my start button there and plug it in now we won't get that slow blink because it won't be in web config mode but it's also not in a game controller mode because I don't have it plugged into a switch so it's just blank but that's kind of nice because now when we plug it into the switch turn on the switch oh that should have lit and I don't know why it didn't interesting let's see if the macro still works or is something funky happening the macro is working I don't know why the led isn't working did I not maybe I didn't enable that and I thought I did I won't bother trying to fix that though I'll let that be an exercise for the reader the viewer um thanks for uh indulging me I think this is really cool I think um this is gonna open up some uh possibilities for interesting weird controllers um I'll share with you one of the things that uh actually one of the reasons that I'm using this little terminal block adapter here is I was thinking of taking this absolutely wacky controller I have let me show you this thing this is outrageous that thing there you can see it's a million buttons acts as two players uh has a track ball on it which I don't think that will support but who knows maybe it will and this thing is old school it's got a usb if I'm correct I think it's got usb uh yeah and it's also got ps2 and joyport connection so this is like an older pc thing so that could be fun to bring that into the modern era using the pico and and the nice thing about it is we get the incredibly low latency because that's one of the issues anytime you try to make a microcontroller that'll act as a legit arcade game controller for not for arcade cabinets which just use switches but for usb kind of stuff game consoles um bring that over to a fight game on your switch that'd be pretty wild uh I don't know if it handles two player or not you could potentially split that thing into two picos though for five bucks a piece or something like that so that's it that's what I've got uh thanks for hanging in there that was a long one with a bunch of details but hopefully that was interesting to some people um if you want to buy some stuff maybe you want to get a pico h get get a jumpstart on this project some jumper cables uh go to adafruit.com and use this coupon code right here it is gotta catch them all gotta hyphen catch them hyphen all hyphen hyphen hyphen except don't use those last three uh that'll get tape set off store go over adafruit.com right here that's not it but let's back up check it out products view all cool stuff right here uh do we have pico h's in stock we do they're five dollars uh that's the one that has the header soldered on makes it easier to do this uh with a minimal setup but you could get for four dollars a pico no headers uh make it even smaller and uh that'll that'll save you 10 percent off on your order obviously you don't want to buy just that probably due to shipping stuff I know uh but if you have a pile of stuff you want to get and you want to get 10 percent off today just use that coupon code it'll be good until midnight east coast time tonight that's it that's the show thanks everyone for stopping by thanks to people over in the discord thanks to people over in our chat on uh the youtube hello yeah david esis is the waveshare rp 2040 tiny looks interesting I haven't checked it out but I love all the rp 2040 boards amazing uh by the way one of the reasons this is specific this project is specific to rp 2040s is it uses the two cores and the pio's the pio state machines uh to split some tasks out in order to have that incredibly tight tight uh low latency so it's uh it takes full advantage of some of the benefits of the rp 2040 okay that's going to do it that's the show for today thanks everyone for stopping by come on by tomorrow there's going to be a deep dive with tim I believe it's tomorrow ask around on the chats if you're not sure um the uh next week looks like another one of these uh product pick of the week shows from me on tuesday wednesday there'd be a 3d hangouts there'd be a show and tell I believe liz is guest hosting next week I'll be guest hosting the following week and then they'll be an ask an engineer after that uh and then the show will happen again next thursday so thanks everyone for stopping by for a different industries I'm john park this has been john park's workshop bye bye