 Discord, and you can look for the live broadcast chat channel in there. It looks like that right there. That's it. And what else? We've also got the YouTube chat up, which I can see. So hello, David Desa. Thanks for stopping by there and over in our Discord. Hey, some nice. Darman, Paul Cutler, BlitzCityDIY. So you grover, thanks. Thanks for hopping in here this afternoon. So let's see what are we got going on today? I'm back, first of all, and that is due to me taking apart this very computer. This is an iMac Pro. It's seven years old. It's what I use for streaming and some of my video editing. It is a beast of a machine, but it's an Intel machine, so it's getting kind of long in the tooth. But I like it anyway. It's got like 32 cores or something like that. And it's Xeon processors, a bazillion tons of RAM, a big graphic card. And it seemed to have died. It started shutting itself down somewhere after the live stream for the Adabox unboxing. It started to get really unruly, and I went through wiping it, wiping the hard drive, putting the OS back on, zapping all sorts of P-RAM things, unplugging every possible USB anything going into it. And it was still dying. So my friend Todd Kurt, Todd Bot, he said, hey, have you tried taking it apart and just receding the cables and stuff? I said, sure, let's do it. And this is one of the ones you have to use, a guitar pick or other spudger, and peel the face off the thing, because it's a monitor that's just kind of glued in with those 3M adhesive strips to the case. So peel it open and unplug a bazillion things and unscrew stuff, blow off a little bit of dust. It wasn't that dusty in there, which is surprising, given that it lives here in the workshop. Receded everything, receded the RAM, plugged all the cables back in. It started working again. So here we are. I've reinstalled the software that I need, just the minimal set I need to do what I do here. And it's working, knock wood, right? I'm probably dooming myself. It's just gonna catch on fire or something, turn into a hell gate, but anyway, we're back. So that's why I was out last week. So thanks for hanging in and thanks for understanding. Xenon says DJ Morph over in the YouTube. Xenon is the PC on the Xbox 360. What is this thing? This thing really is beastly, but it's so hard when you get a massive computer because within a few years, it's basically obsolete. 2.3 gigahertz, 18 core Xenon W with a Radeon Pro Vega 64 with 16 gigs of GPU RAM. 128 gigs of RAM on this thing, right? You can see why I don't want it to die. I know I should probably get a M2 or M3 base machine at some point, but I'm stubborn. So this is the one we're using. Also this is a nice camera on it. This is just the FaceTime camera right here. Every other Mac I've used, even newer ones, like on the MacBook Pros, the camera isn't that great. This one's pretty nice. All right, so enough about this silly computer. Something I says, if your machine dies, it means Apple's releasing a new one soon. The studio looks nice, right? Those little fat versions of a Mac mini. Those look kind of nice. All right, so what have I got going on today? I've got a coupon code for you if you wanna save a little money in the store. I have a wrap up recap of the product pick of the week show from Tuesday. I have a Circuit Python Parsec for you. And I'll do a little bit of a recap of a project learn guide. I have a new project that I'm working on that we're gonna dive into. And that should be the show. I hope I didn't miss anything. So starting off with coupon code. Today's coupon code is PSX. PSX is the coupon code. Go to the Adafruit store, throw some stuff in your cart. And in the coupon code field type in PSX. And you'll get 10% off. Where's my browser? Here it is. Look, here's the store. Just go to Adafruit.com. That'll take you right there. You can click on products and new products, featured products, all the different product categories. As long as it's physical goods, you will get 10% off using that coupon code. It's not good for software gift certificates or subscriptions, but it's good on stuff. Why the coupon code PSX? PSX is the original name or the code name for the PlayStation 1, the first PlayStation, PlayStation controllers are what we're gonna be dealing with later today in the project. And I still think of it as the PSX. Probably because I was reading gaming magazines and the lead up to it coming out and I think that it was referred to as PSX for a while. Same with Ultra 64. Does everyone remember when Nintendo 64 was in the works and it started to show up in the gaming magazines as the Ultra 64? Sneaky code name. But PSX, that's what we've got here today for your coupon code. So use that in the Adafruit store and get some neat things. We have some cool new products. In fact, if you click on that products, new products view all or just go to adafruit.com slash new, you can see we have a cute little programmable robot car that uses a micro bit. 20 of those there in stock, get 10% off of that, not bad. We have a few interesting looking infrared boards. There's a demodulator breakout, there's a receiver breakout, and there was one other, wasn't there? There was, did I miss it? I guess it's those two. Yeah, and then we have the sender. We have the regular sender. These are the receiver side of things. So we've got those coming, they're out. Yeah, they're in stock. Gotta save a little money on those. More elect freak stuff, a programmable little arcade board with a screen and a little controller shape on it. I like controllers. So those are some things that you could go and grab and get yourself that discount, 10% off. Johnny Bergdahl over in the Discord chat says the studio, the Mac studio, is just ugly. I have one. I'm always sad at how few ports are on the back of these things. This one, this iMac actually is pretty decent. It has like, let's say six USB-C and a lot of those are Thunderbolt. It has like four more USB-A. And I think those are all USB 3.0. Does it have HDMI? No, it doesn't have HDMI. It has some regular Thunderbolt ports on it. Ethernet port, SD card, not bad. All right, next up. So I've got my show on Tuesdays, which is the product pick show. And on the show, we reveal a new product pick, something new, something favorite. I give you a little bit of a demo on it and we give you a big discount, it's 50% off in this case. Here is a little one minute recap of this week's show. It is the SHT41, Temperature and Humidity Trinky. As a quick, easy monitoring solution. And you can see here, this just slides right in. And that's a thick enough board that it actually stays in there quite nicely. Here you can see every two seconds I have it logging the temperature in both Celsius and Fahrenheit. So it's about 78 degrees in here right now. And humidity is at about 29%. I can probably skew that a bit either by just touching the sensor, that'll probably warm it up a bit. Oh, it's cooling it. I'm cooler than the air. You can see the humidity jumped up there just because of some perspiration on my finger. Or if I blow on it. So if we give it a little warm, hot breath there, we got it up to 83 degrees and about 80% humidity. The SHT41, Temperature and Humidity Trinky. Yes it is. We also have a, what is it? The SHT45. It was out of stock so I didn't do that one in the show. But that's a similar one. It's just slightly more accurate if you need the utmost inaccuracy for your temperature and humidity. You can watch for that one. Right, so next up, I've got a Circuit Python Parsec for you. Okay, let's get this set up and running. We don't really need to see too much on the microcontroller side today, but I like to have some accompaniment usually. There we go. Because what we're talking about today is on the Circuit Python Parsec today, I wanted to show you how you can monitor your battery voltage in Circuit Python. So here we have a Feather M4 and this and a number of our other boards, especially ones that have a battery input, have a pin, one of the analog pins that can be used as a voltage monitoring pin. It is not broken out onto the board. It is just used sort of internally as a voltage divider to tell you what the voltage is on the battery. So here you can see, I'm gonna go ahead and plug in this little battery here. And in the REPL, you will see, it's gonna start saying voltage is 3.9 volts. It's good. So what I can do now, and you can ignore the voltage when I unplug it, it's actually, I think, just pulling whatever the voltage regulator value is. But when I plug in another battery, this is a big, fat battery I had sitting around and hadn't used in a long time. There, this one says, hey, 3.0, 3.05 volts is low. It's time to charge. So this is able to detect the voltage coming from your battery, which on these Lipos is a pretty good indication of when it's time to charge. They can start at around four or so volts. And when they are at 3.7, that's sort of their sweet spot. When they start to sag below that, that's when you know it's probably time to charge them again. And so the way this works is, I have from analog IO, import analog in that allows me to read an analog input, one of the ADCs. And then I'm setting up this variable VBAT voltage equals analog in board dot voltage monitor. Not all boards have this, but I'll show you on another parsec how you can create your own if you need it. But this is an internal pin that's used to monitor that voltage. Then we have a little function here, which just converts that from the analog 16 bit value into volts. And then in the main loop here, I have battery voltage variable equals get voltage VBAT voltage. So it's gonna go and return that as the voltage from the analog read. Then if that value is less than 3.7, or sorry, if that value is greater than 3.7, I print out, hey, that's good and print out the actual value. And if it's below that, then we say, hey, it's time to charge. And then we repeat that every two seconds. And so that is how you can monitor your battery voltage on your microcontroller inside of circuit Python. And that is your circuit Python parsec. Where'd I go? There I am. I'll show you next week on an RP2040 because that's one that doesn't have enough analog pins to sacrifice one for this use. How to set it up as a little circuit that's external. But this is really useful for any kind of projects that you have that are remote, that are wireless, that need to occasionally be recharged. Maybe you're using something that's a, using solar. And we have some dedications here and we have some dedicated hardware that you can use to monitor batteries, but this is a really nice one that requires no extra hardware, just that pin that's built in and used to reveal what the voltage is coming off the battery. Plug that, set that off to the side. Let's see, so next up, I wanted to go ahead and head to learn and just go over the mechanical watch winder learn guide that I put out last week. That was a project we've been working on, leading up to that. And here we go, switch over to that. So if you go to learn.adafruit.com by the way, there's a section here called new guides. You can look there for new guides. One thing I'll let you know if you're curious why sometimes an old looking guide shows up is because it's been updated. And some of this is, I believe, changes that were made to switching from secrets.py over to settings.toml. And so as the guides get updated to reflect that change for any internet connected gizmos, you'll see that the guide will kinda get tagged as new and it'll start showing up in the new guide section. But here we have this one, which is legitimately pretty new and that's the automatic mechanical watch winder that I built using a Cricut as the sort of motor driver, a circuit playground express coded it in make code to make it nice and easy as a sort of graphical blockly based programming tool. And then built this platform using Lego bricks and elements so that I can set this watch when I'm not winding it on there and it'll stay accurate even if I don't wear it for a couple of days. So here you'll see I've got a little video there. It'll show you in action. I have a assemble the watch winder page here. You'll see I've got a little render of the bricks part of the thing which it did in Bricklink Studio which is what I used to design it and also to export the parts lists. So you can buy these off of Bricklink or another brick reseller if you want. If you click on this link here, Bricklink design files, I'll open that in a new tab. This is the studio gallery in Bricklink. This will give you some more images of the renders I did and a final image of the device in the real world. There's a little explanation there and let me see if I can zoom this to a normal size. There we go. If you scroll over to the side here, you'll see there are download studio file that'll allow you to download it and open it up in Bricklink Studio which is a free CAD program for Lego that I used. It's really popular. And you can also click on view instructions which will show you a sort of simplified, automated version of the build. This is created just from the studio file. I also have a PDF file that's the sort of more manual layout style, more like an instruction manual. You can also click on easy buy. This will bring you into the sort of Bricklink ecosystem to find a place to buy the parts. I found this probably around $45, $50 if you get all those parts from the average seller. If we go back here to the guide itself, here's this build instructions PDF. I'll click that and go back. So this is the one I used, the tools inside of Bricklink. You can see it uses this more illustration style of the parts there. DJ Morph says, everything is awesome. And this also does the little highlight in red, any parts that are new in that step, which is neat. Just as putting together the little gear reduction, worm gear box there, adding all those parts on, throw in that tire. And then from here, it's mostly just laying tiles down to make the surface look nice. And then I leave off sort of the final step there which is putting the cricket with its 3D printed adapter plate that clicks it into those bricks. There's also the standard parts, what do you call this? Contents, parts list, the parts list at the end there with their official Lego ID numbers, official colors, how many of them you need. So that's pretty neat. You can make those in Bricklink just like we used to in Lego Digital Designer and back a few years ago before this kind of took over. And then in the guide here, you can see we've got a pretty simple setup for driving the motor. It's just the two leads go into motor one ports A and B there and also have our little axle to motor shaft adapter there that puts it into the sort of Lego shaft, axle shaft cross axle territory and then assemble the gearbox, put the rest of it together. Here's this 3D printed part, it's the only 3D printed part you need for this. You can do without this if you wanted, you could probably just rest it there or build up a little holder around it in Lego or other material. But if you do want to, you can 3D print that and it has the little anti studs or tubes on the bottom that you can use to click into it. And then here's a little section on coding it with make code. I was wrong by the way. I think I said when I was first putting this together on the live stream that you needed to use the beta of make code in order to get the cricket extension, that was not true. I think I had a little cached old file cache in there that was leaving it off but you can use the regular makecode.adofruit.com editor don't need the beta and you'll be able to add that extension. And there's the little setup of what the logic for the buttons and the lights do. I won't go over all that here, but you can check it out. You can also download the whole thing and then flash that to your cricket or your Circle Playground Express rather. And then here's a little info on using it as well as the demo of the minor. So that's the learn guide. It's out there and hope you enjoy it. Let me know if anyone puts one together or if you use that basic idea for something else. I think I've mentioned this before. My friend Mark built a, Mark Franfelder built a peanut butter stirrer that was a really similar idea years and years ago. I think he maybe had an Arduino. I don't remember what was driving a motor on it but he had a small wood stand with a strap around a jar of organic peanut butter that kept separating or maybe it was yogurt. I think it was peanut butter. And he would have it just turn every once in a while so that his peanut butter stayed mixed up. So there's a lot of uses for that sort of intermittent rotation type of device that can handle a fairly heavy load on it. Okay, so now let's get into the new project. I covered what I wanted to, yeah, yeah. So the new project, let's first of all talk about the PlayStation controller. So I mentioned the, oh, now I'm dropping screws out of the back of this one. Oh, let me see if I can shake out any, there we go. I unscrewed this one so we can take a look at it. So this is the original PlayStation controller, PSX or PS1 controller, shipped with the first PlayStation. Later they updated it to have the two analog sticks at the bottom there called the dual shock. And then I think it wasn't maybe until the PlayStation 2 that they added the rumble feedback haptic motors in here. So this is the original one. And the idea here is that I wanted to build a wireless Bluetooth game controller that I could use with my Mac or with a PC as a game controller that I can play retro games under emulation with that just has some of the standard buttons. So no analog inputs, just the D-pad for up, down, left, right. Just four buttons or even just two buttons here. Maybe a couple of shoulder buttons. I would make it compatible with SNES. I think that's maybe Genesis as well. You need six buttons. But I needed some space. So originally I was gonna use, and I'll show you the work I did on this one. Originally I was gonna use this SNES controller clone, the dog bone shaped controller clone. Not a lot of space in there. So then I thought, hey, what about PS1 PlayStation controller? It has these little handles that are a whole lot of empty space on this controller. Later they fill that up, of course. But on this controller in particular, we'll bring it over there and open it up. We get a lot of space to work with, but other than that it's really the same as a SNES controller plus two extra shoulder buttons. So D-pad, ABXY, or Circle Triangle Square Cross on the PlayStation, select and start, you need those. And so that's what I did. So the, if we jump over here, the way that I wanted to approach this was using, well I'm on second, oh am I missing, oh there we go. Was using an ESP32. So the first thing I did was load up on a QDPI ESP32 and Arduino library that is designed to be a BLE, Bluetooth Low Energy Game Pad. And I'll show you the code there in a second and what this looks like. And with that set up, I was able to then just ground any of these pins, just with a jumper wire, to test and see, am I able to get it to show up as a Bluetooth device, pair it with a PS1 PS2 controller. So that's what I did with the PS2. Pair it with a computer and then press some buttons and that worked. So this would work for that, I think. One, two, three, four, five, six, seven, eight, nine, 10. So there's 10 inputs that we can use on here. I think that's the limit, right? You might eke out one or two others using the Stemacutee port, but it's pushing it. And if you wanted to then add these shoulder buttons, you're starting to run out of room. So next thing I did was make my life easy by making it a bigger board. I just grabbed a Feather ESP32-V2. So ESP32, original kind of ESP32. This one's called the V2 of this. It's a Huzzah. And then you can see I wired up 10 buttons to it. So then I could start actually figuring out which buttons I needed and how to lay them out, which ones to skip on some boards. There are pins you can't really use that you might think you can use for various reasons. So this one was sort of phase two of the operation. Since I'd be running it with a battery and needing to charge it, this was one other reason I thought about the Feather is that it gives you the charging on board, the battery can plug right in here and it has a lot of pins on it. However, it is, even on the PlayStation 1 controller, a little bit big, a little too big to fit in. But I wanted to prototype one other thing because I'm gonna have a battery in this thing, right? I'm gonna have a little lipo battery. And Lamore suggested using, since ESP32 can do some pretty significant power savings in a deep sleep mode, that's kind of perfect for a game controller because essentially you want it to stop using its radio and any extra peripherals other than watching a pin to be woken up so it can go into a really deep sleep and save a bunch of your battery power. So that was the next thing I tested on this one and there are I think 10 RTC GPIO, so real-time clock GPIO pins, which can be watched while you're in deep sleep mode and can wake up the ESP32 from a deep sleep. So I set this here, which is the start button. I set that one, I think I had it on pin four, GPIO four as far as the chip goes, not what the feather silkscreen is named, and was able to see it connect to my computer, use it for as long as I wanted to, and then I told it if there's no activity for 10 seconds or whatever it is, go into deep sleep, watch this button, the start pin, and if that gets touched then we wake the thing back up and it connects back up and you can continue using it. So it's pretty typical controller behavior if you think about even modern controllers, they don't really have an on-off switch, they just have a sleep and then wake up when you start using them again. The one I was comparing it to is actually an 8-bit do controller that I have, which presents itself as essentially a gamepad controller for things like your computer more than necessarily for your games machines, that can be a different animal and a little more complicated. So I was just really setting this up for a computer, not a console. With all that working, I decided it was time to move to the sort of perfect board in between these two, which is the ESP32 itsy bitsy, and I can show it to you here if I just pull the back off of this because I've already got it wired into place. So you can see there, compared to our feather, it's quite a bit smaller compared to our cutie pie. It's actually maybe just twice the length. It's about the same width, and I think it's just a little shorter than two cutie pies. What we have here is more GPIO, so we can hook up all the buttons we want, and I wanted to have at least one or maybe two extra pins available for the reset and maybe enable. So that with this thing all closed up, you could still essentially power it off temporarily with the enable pin, if you're having trouble getting to boot for some reason, and the reset, because sometimes you just wanna hit reset on the thing. So this is perfect for the number of GPIO pins. It also has, I think, 10 of them that can be used as real-time clock, and I really just need one. Downside, there's no battery charging on here, so I decided to use a, I don't think I have an extra one right here, but I decided to use one of our battery-charging backpacks. We have a lipo backpack. It is actually hidden underneath the battery. You can kinda see some little glittering under there. There's a, I don't wanna peel this off. There's a lipo backpack. It just connects to USB power, battery, pin, and ground. And then you can charge this lipo using that little backpack when you plug in the ipsy-bitsy. Problem with that is, I'm closing this thing up, and the USB port faces over here. The answer to that is a little USB breakout, and you can see I have a tiny little micro USB breakout up at the top here, I zoom in, can I zoom in any closer? No, not really, sorry. Sorry about the camera motion there. So this is a Micro B version of this, is a USB-C one. I almost went with the USB-C one, but it's actually a little bit larger, and it has a little more material that stops the port from peeking out. Would have been nice to go to USB-C, and I'm not using this for data. I'm just using this for charging. Reason for that is there's not, as far as I know, a convenient way to tap into the D plus and the D minus on the ipsy-bitsy. I think the KV2040 is our only board that has the data pins easily broken out so that you can move the USB port somewhere. So all this is for is for charging, and I just wanted to get it pretty small and point it up at the end here. That is the original cable port. That's where that comes out. So I had to cut a little material away on this side of the shell and on this side of the shell to get that to, when it's closed up, still be accessible. And I may still either take more material away from that or chop the Micro B adapter, PCB a little bit to push it out further just to make it easy to plug in. Right now, I just have it capped on tape to the original PlayStation PCB here, but that's not super secure, so I may end up epoxy-ing that. And one of the things I'll show you is I was searching around for people who had done this kind of a modification, and there's one that someone did, I don't know, maybe 10 years ago. And I followed a whole lot of the same ideas. This Micro Breakout, they used the same Micro B Breakout from Adafruit. They had a Blue Fruit Friend, something we used to sell as sort of a less programmable, kind of ready-made Bluetooth BLE controller type of device. Might have been a different charging situation, I can't remember, but I'll show that project, but I think they did a great job because as I was trying out different ideas on how to put this together, I kept arriving at the same solutions that person had at one point. I was like, oh, what if I pull off a couple of these buttons and have USB ports poking out? That would be easy. Maybe we could fit a whole cutie pie in there. But this turns out, I think, to be one of the more elegant solutions. I did drill one hole in the back here so that we can see the Neopixel on the back, and I have it lighting up blue and we have made a connection with Bluetooth. And I may do a hole on the side so that we can see the charging. There's a big bright LED in there, but it doesn't have anywhere to peek out that light. So let's take a look at kind of side by side this modified one I've got here and what it takes to do that modification. I'm also just gonna, by the way, open up my discord so that I can see if there's any questions or thoughts happening during the show. Oh, Scur says that USB pins, I think are broken to test points on the bottom. That's good to know. That would be pretty cool. I will say, since I couldn't break out the data pins for this, I decided to try to take it one extra step further, which is I'm coding this in Arduino. And in Arduino, there's a pretty well developed over-the-air firmware update solution. So you can essentially write code, a little extra code on top of what your thing is really trying to do, that will present this board as a server. You can, as long as you're on the same Wi-Fi network, you can go to this board's server and there's a tool to flash it with new software. So that means even when this thing is closed up, I can code it wire free. So running off of battery or with the USB cable then just for charging purposes, we can actually still code this using the over-the-air update, which I think is really cool. So that is one additional sort of layer on top of this that I think is neat. So here's the original controller. I happened to get these at a local retro gaming store for $9 apiece, which I thought was a great deal. They run about 12, 15 bucks on eBay plus shipping and you got to wait. So I was really fortunate that my local gaming store had a stock of these. So eight screws, unscrew those. And you can see the shell pulls off. I will mention one other thing. There is quite a bit of space in the bottom half of the shell here for a battery and other stuff. And I was tempted to put things in there, but I really love trying to get everything into one side so that when you pull it apart and put it back together, you don't have wires that you're trying to sort of shove in there. I think you could fit the 500 milliamp battery, 500 milliamp hour battery in here on this side if you were willing to have some wiring connecting the two halves, but I put a 350 in and was able to get it all into one half. So that was one of my design constraints there. So if you look at side by side here, this is what we're starting with. The original unmodified one has some strain relief for the cable. So that pulls out of there. This is the cable connector, controller cable connector, which is soldered on. It looks like a sort of molex connector or something. It is not one that you can just pull off. That's soldered on there. It's pretty easy to desolder, so I desoldered that on mine. If you look here, we've got these four buttons that make up the shoulder buttons. They're on their own, there's two per PCB and those have two switch lines and a ground. And that's it, that pulls right out. And then this is what's on the inside of the shell. It is just three elastomer, conductive pad, standard game pad type of guys here. But really nicely built. By the way, I went in and had a third party controller. These are OEM real Sony ones. And it is quite impressive how much better the design and the materials are on the real Sony ones compared to a clone one. So I think I got the clone one for five bucks and the real one for nine, I recommend the real one. Especially if you start drilling into things, you'll find some of these posts and things are broken off on the OEM ones because they're just cheaper. This is very well made ABS plastic. So setting that aside, you can see here there was also a capacitor on the original, which I got rid of, desoldered and pulled that out. And then if we flip it over, you can see we have a pretty standard game pad type of arrangement here. There's your circle, cross, triangle, square. There are test points. If you see this gold right here, these little gold test points. For every one of the traces that we need, which is fantastic, makes it so much easier to solder this kind of thing together. And I just used, I'll show you the link. We have multicolor hookup wire that's like wire wrap style wire, just real thin. But the multicolor makes it a lot easier to keep things straight. Also on the side, there are a few passives. And then there's the chip here, which I forget what chip this is. If you look it up, you can find out maybe a little bit. I think it's a CFS0121, maybe. And I desoldered that. Originally I was gonna leave it in, but since the GPIO pins I was holding high and then sending low when I pressed something, it was, I was getting spurious hits when this chip was essentially getting back charged from my itsy bitsy. So I just desoldered that and pulled that off. Other thing I did is that when we remove this set of the cable connectors there, you end up with a bunch of holes. One of them is a ground, so I desoldered to it. But you have enough with a bunch of holes that you can run your wires from the backside into there and then around. And this will be in the guide. I took pictures of this, I went in the learn guide. But it can be a problem with these kind of projects to wire these pads and not end up with a mess of wires that are interfering with a little elastomer. You don't want wires bumping into things when you're trying to press buttons, playing a game. So I used these holes to essentially dive my wires through so I have minimal runs. And the same with these three here. These are three unused. You can see these holes here, right there. Those are three unused pads. I don't know what the designers originally were gonna put there, but it's unpopulated on all of these. So I just dive wires through there since the wires I'm using are so thin. And what else? You can't use these holes. These are where the posts run through. Another thing about these type of projects is it's really important to provide pressure against the, wrong side, provide pressure against the board. Otherwise when you press the buttons, they will push the PCB and you won't get a good button press. So the board needs to be held really tightly against these little plastic bosses, which is why you never have as much space in these as you think you do. Like you'd think, oh, I can put a battery here and a controller there. There are always gonna be, either they'll be screwed in or in this case, and I think in the better controller designs I've seen, there's gonna be a whole lot of plastic coming from the back half of the shell that all of that is countering that PCB from moving when you press buttons. So these need to be held in really well. So that's what this is about. Some of these are stiffeners. These horizontal ones keep this from flexing too much. And you could shave those down if you needed the space. I didn't end up needing it for the itsy bitsy. This just fits there. And I think that covers most of what I did with the actual shell hardware design. If you look here, you can see I can, I gave myself a lot of slack there. So you can see there is the wiring there. And what I'm gonna do now is actually switch over to the other computer where I have the closeup camera. We can take a better look at some of what's going on here. I'm gonna go to this view of the world here and let me turn on a light. Pretty good, okay. So you can see here, if I pull this away, I probably could have gone shorter with the wires but I wanted to be able to actually have room away from the board to solder things. And this sort of just compresses this wad of wires down well enough and that all fits in this space that's here. You can see there a little better is the hole I drilled through for my Bluetooth indicator on the Neopixel there. And if you look, here are some of those holes I mentioned right there are where my wires are diving through and then they go through the other side. I won't flip this over right now just because I wanna demo it and I don't wanna pull it apart. Main thing really this would all pull out other than my battery being taped to the case here so it doesn't flop around and taped there. But that's what that looks like. There you can see this is pressed like that when this is closed. So not perfectly neat. I wish it could be but it's not perfectly neat. And here's the other side of that where I just carved it away with some snips a bit. I could probably file it a little bit. And so when I close that down, see it seals up nice and tight and then you can screw that in place. I'll just keep it like this for now. So what I'll do is try to demo it. So let's take a look first at gamepad tester. So this is a website free website. I use this for testing gamepad stuff a lot. And what you see here is that I've got, oops, what did I do? It's two and second. I had this view, there we go. Okay, so you can see here right now gamepad tester does not think there's a gamepad connected. I hear a bit better. And if I press buttons, nothing is happening, which is kind of fine. I don't wanna accidentally turn the thing on. But if I press the start button, give it a moment and it will wake up. So that's the deep sleep on the ESP32. And now I think I have it set to 15 seconds. If there are no buttons pressed for 15 seconds, it's gonna go back to sleep. So you can see here I can test up, down, left, right, OX, triangle square, select, start, and these two shoulder buttons. So all of that you can see is registering as button numbers. And what I'll do is just leave it alone for I think I said 15 seconds. And you should see it basically disappear. The board is gonna go into deep sleep, which means we drop the Bluetooth connection. And now gamepad tester's like, hey, where'd it go? Which is excellent. So it's saving power and then I wanna use it again. I'll just press start on here. It's three, four seconds and it is back in business, which I think is totally acceptable. I think this is pretty much how all your game console controllers work is that they go into a deep sleep to save power. You pick them up, a lot of them have accelerometers on them now, so even just touching it, I think we'll wake it up or you touch any button. So there it goes, I didn't press anything for a while, it fell asleep. So now let's do a slightly more interesting demo. I'll play a game, so let's switch over to this. And right now it, again, the controller has fallen asleep, so I can't do anything. Press start, should wake it up. And now press, I think I have to highlight my, here, oh, there we go. And now we can play some Micromages. So this is a NES game that was written in the last few years, it's a fairly new game that I love and I've demoed it on here before. This is playing on an NES emulator. It actually also did come out in cartridge form. But you can see I'm playing the game that does not feel like a weird homemade controller or anything, the latency is fine. You probably couldn't play a fight game, the types of games where people want wired controllers or incredibly low latency, but maybe, I don't know. Watch out, bats, get away from me. Boing. And now I can pause. Now you'll see if I go into the game, edit game controls, you can set it up for keyboard or the itsy controller BLE, so that shows up. And then in here I can tell it what's gonna be what. So up, down, left, right, start, select, A, B. That's all it wants for that type of game. If I, let's stop this game, and I'll play a, how about, I think I want a, say a Game Boy Advance game, how about Mario vs. Donkey Kong? Make that small, scale, three maybe. Pause out there. So again, I'm gonna go and say, edit the game controls. Wake up the controller. And so now I need to input what does what on a Game Boy Advance. So again, up, down, left, right, start, select, A, B, left trigger, right trigger, and that's all. And you could use a couple extra buttons if you wanted to for something else. Now I should be able to play the game. I should have probably picked something that I had started before. We'll watch a bunch of cut scenes. You get the idea. So it works great. It is all coded in Arduino. If we take a look at, let's see, did I do Arduino capture? I could do, just to see if we can use this. Does that kind of work? Oh weird, it doesn't want to show that. Let's do a new screen capture. Oops, not a monitor, we'll do a window. Okay, good. So this is the version of this that I set up that does the main controller stuff, BLE, and it does the sleep stuff. This is not the one that has the over the air updates. I can show that one too if there's interest. But important things here are these libraries. So if we follow this link, this is Lemmingdev ESP32 BLE gamepad. It just works, it works great. Has a bunch of example code that you can use to start from. My main challenge was the setup on this one. It was just easier to use my D-pad as buttons rather than as axes. You'll see in a lot of like in game tester, a lot of controllers, even if their D-pad will show up as if they were a analog joystick that's just either kind of on or off in one direction or another. I couldn't get that working in here well and I don't know if it's necessary too, but that is one thing is a lot of these examples expect you to use analog or digital D-pad direction stuff on the axis message that sends to your computer versus a button, but you can see in my case with that emulator you can just config and say here's what left is and it doesn't really matter what comes over. It'll just accept whatever message you press. So that was one of the other is this article I found on Deep Sleep. Let's see, can I go just copy this URL real quick. ESP32 Deep Sleep with Arduino IDE and wake up sources. Fantastic, this'll be in my guide. This really talks you through it, worked great, not a lot to it and has a good example that you can use to have a single button wake it up. I think you can set it up for multiple button wake up which I didn't want. I think I tried it and something was acting unexpected so I bailed, but I think it could be unrelated. It could be a different problem I was having. You can wake up on a timer so you can just tell the thing with no user intervention just wake up every half hour. That's useful for things like sensors. Yes, a good code example's in here and apparently an ad for some shampoo for getting some free air time. And we'll go back to Arduino. If you take a look here, I've got, let's see if I can blow this up a little bit. I can't remember, what zooms, what zooms your code in Arduino? I think just the preferences. Yes, there we go. So if you look here, I'm importing BLE gamepad. That's the Lemming Dev thing. I'm also using my little NeoPixel there. You can see that in action, by the way, I'll turn off this little light here if I peel the cover off there. So if I press start button, it just woke up and connected on Bluetooth and I actually have it turning blue on Bluetooth connection. So if nothing that it's been paired with is on the other end, that won't turn blue. So it's a helpful indicator. It's not gonna just turn blue because it's trying to pair. I have it only when it is paired. You could probably get a little fancier. It's pretty common to do things like a fast blink while it's trying to pair and then steady when it has paired, but I didn't get that fancy. But that means it's paired with the computer. Pairing is just very simple. On whatever device, go into, in this case, on the Mac, you go into the Bluetooth preferences. You'll see devices that are available for pairing. You'll click on it. It connects, seems to work well. So next thing I'm doing, I'm defining the number of buttons. I'm using 12 in this case. That's my D-pad, ABXY, start, select, and two shoulder buttons. And then this button pin bit mask, that article about how to set up sleep mode tells you, and it gives you a web link, how to convert the pin you're using as your sleep wake up to this bit mask. And that could also mean you're using multiple buttons. You'll have a different number in here. And this is actually just a remnant of testing. We don't need that anymore. BLE game pad gets set up. You can see here, you can name it. So that's why mine was showing up as itsy controller BLE. It is something you get to pick there. Manufacturer, that didn't work out the way I thought. I fed it a name. It shows up as like a little hex code, so there might be more to that. I have seen other controllers show up with a name in there. And then I'm not doing any battery monitoring. This 100 could probably just get dropped out of here entirely. Despite my earlier circuit Python parsec about battery monitoring, I'm not doing any on this. Could be another area to expand it to. Then we have a couple of these arrays of button states so that we can do some sort of debouncing. And then you can see I have a whole bunch of notes to myself because I did this on the feather. I did this on the cutie pie, and then I ended up going with the itsy bitsy, which is me making little notes about what are the pins we can use? What are their pin names? Which ones have real time clocks? So any of those can be used for wake up. Which ones acted funny? So don't use those. And I'm not sure in some cases why they acted funny. They should have worked but didn't. DJ Devon 3S, is this on the ESP Classic or S2 S3? This is a classic. This is on the ESP32 itsy bitsy, which is the sort of classic ESP32. And that is purely because that's what the BLE controller library I'm using is for that has really good deep sleep performance. And it's the only ESP32 we have in the itsy bits form factor which turns out to be the right size for this project. Then we have, okay, 20 seconds. So this is where I define how long should it just sit there with no button presses before it goes to sleep. In this case I have 20 seconds. This is some example code stuff that I was using for testing the wake up. You can see here you can wake up from external signal, timer, you can use a touch IO and a couple other cases. And then I'm setting my neopixel there. Main loop, main thing that matters here. ESP sleep enable, external wake up, pin number, and if it's high or low to wake up. Some pin setup, begin game pad, start my neopixel. And then the main loop of this here, if the game pad is connected, then we set the pixel to blue, like I said, and watch for button presses. If there are buttons pressed, we do a couple of things. We press and release with that BLE game pad press and BLE game pad release. And we also test against the timer to see if it's time to go to sleep. So we set this variable last button press. So if the current time at milliseconds minus the last button press time is greater than that 20 second sleep time, then it's gonna go into deep sleep. And the way it does that was just with this ESP deep sleep start. And the rest of it is sort of fairly standard button pressing type of code here that just runs through this array of buttons that we have. And that is it. And so you can see if we go back to my game pad tester here, I'll put the shell back on now so that it'll press that PCB in. I am having to squeeze it closed because I don't have the screws in there just to make sure the buttons get pressed nice and hard. You can see if I wake it up by pressing start, not only do we have those button presses there, you can have kind of all of them at once. I don't have enough fingers to press start and select, but you can see it accepts multi-input, which of course you need sort of N rollover for a game pad to be effective. Last thing is I set that R2 trigger to be reset on the board. So you can see it's just gonna basically disappear because that's resetting the board, now it's back. So that's helpful. You could potentially use that instead of the start button for waking up from deep sleep. So I'm using the sort of very specific deep sleep watch a GPIO that's an RTC GPIO. You could say, you know what, just go to sleep and when I wanna wake you up, I will hit the reset button. That would work as well, but this is way cooler and probably more useful in certain scenarios to be able to do that a little more elegantly. So I decided to use that method. This one currently does nothing, but I may hook that up between ground and the enable pin, which would give you sort of a heftier reset because that's really cutting power. You'll notice I have no, like I said, I have no power switch. You could run an external power switch from the battery, the lipo board that I'm using that runs from the battery to it to the controller. So we could have a hard switch on it, maybe mount a real toggle back here. But again, I don't think it's necessary because this goes into deep sleep and you just wake it up when you need it by pressing start and there's your controller again. So let's see a couple of other things. I'll just show what the parts are that we're using here. So it is, it's a bit C ESP, yep, ESP. It's this one with the PCB antenna. So that's the board that we're running on. And if you look at pro trinket lipoly, that's the name of this little backpack. It works on a trinket as well. It'll actually, you could mount it right on top. Just as you see it here, it'll fit right on top of the it's a bit C, but that did not give me enough room to close the controller. So that's why I ran it down underneath the battery. And that's pretty much it. We have a little micro USB breakout. And that's what I'm using again just cause it's so nice and stubby. I mentioned there is a project and did I forget to bring the URL? Okay, I'm just gonna Google this real quick, but that can give surprising results when you just start Googling things. So I'll hide that for a second and look for PlayStation controller Bluetooth Mod. Here it is, I think. It's an imager link. So it's not that easy of mine. Sorry, let me get rid of the word Mod cause that's bringing up an eight bit dough product. No, okay, well I'll put it in the guide. Maybe I'll show it next week, but hats off to this person who's done it 10 years ago with some much, much older Adafruit products. But this is sort of the modernized version of that. All right, let's see. I'm just gonna check the chat real quick and see QDPI charger. BFF is one of the smaller ones if you want even less of a footprint. Actually, it's bigger. The QDPI BFF is bigger than this. This just looks big because of the photo, but it's that right there. That's the little lipoly. It's backpacked for pro trinket slash itsy bitsy. It's tiny. And this one actually, if you did wanna do the external power switch thing, this one has pins for it which is nice. You could do that on the BFF, but you'd have to sort of surface mount solder to the pads that the onboard switch cause it has an onboard off switch. Another thing you could do if you're willing to is get rid of those JST connectors and then wire battery directly to board, but that can get a little sketchy. And DJ Devon 3, I had the same reaction when I first saw that. I thought that that's how big that thing is. That's actually sitting on a blue board so you can't tell, but it's sitting on a pro trinket I think. But yeah, that board is tiny. Let's see, what else? Oh, a DIY charger for the itsy. This is a C Grover charger, I'll turn it to check out, very cool. Another option with these things potentially is wireless charging. So you could do no port, no drill hole if you can fit in a little inductive charger and just set it on a mat to charge. That's certainly a possibility. Let's see. Todd says, I'll bring up the Discord there. Todd says, oh cool, GIF by the way, NSQ7, always with the good GIFs, that's awesome. Todd says, I just want an excuse to play cool indie games on my live stream so I don't have to set up Twitch. I will always find a reason to play some Micromages. It's a fun game. Todd says, I'm amazed how sturdy the first party controllers are. Imagine all the forces we put on them. Yeah, I mean incredible. This one, the one I chose to modify, maybe I'll swap the shell for a different one is slightly yellowed on the bottom, which is kind of gross. I'm not sure if that's cleanable, just dirt, or if that's a tobacco thing that'll never come out. The two others that I got are actually pretty clean. So they, I think by the time the PlayStation 1 had come out, the plastics had been the problems with the plastics that yellow had been solved. I think it was a fire retardant in the plastic in things like, you know, your old Apple computer or your SNES, you can see how this nest here is kind of yellowed. I think that that had been solved by the time PlayStation came out. So I don't think you see that weird sun damage on PlayStation. That could be wrong, but yeah, PlayStation controllers are really nice ones to start from. Also, I think it was some nice who mentioned their original Xbox controller that was huge. I think you must have had the Duke, right? There was the original, let me show you this, the original place, Xbox control, look at that thing. Was this giant? The Duke, it got nicknamed later. They came out with something smaller after it. Oh my God, look how fat that thing looks. That got revised into a smaller one. This is in the U.S. only, but I think the designers wanted to make a statement with that controller, the Duke. Yeah, you could fit, I mean, if no one has put a circular OLED in there, TFT, they should, there's space, it's massive. I don't have one of those. I never had that, did I? I have an, I had an original Xbox, but I don't think I had the Duke controller. I got the revision that was smaller. You could fit a full Arduino in there, Grand Central. What is with this? This thing, Teenage Mutant Ninja Turtle Fuggler, Lars's long lost cousin there. Thanks, Skir. I think DJ Devon 3 sent me that too. Have you people bought these? Are they available? Are they bringing back Fugglers? Amazing. All right, I think that's it. DJ Devon 3, maybe it was based on the Jaguar controller, which has like 90 buttons on it, it's nuts. Okay, that's the show. Thanks everyone for stopping by. I will be working on documenting this. I'll be playing around with the code a little bit. The one thing I didn't show was the code for updating it over the air. I wanna make sure that that's working well before I commit to that and publish that. Otherwise, I will look for the data pins under the board so that I could do a plugin update. Or you could not. You could just open the thing when you wanted to code it. You can see it's still pretty approachable. It's just eight screws. All right, that is gonna do it for today. Thanks everyone for stopping by. Once again, I'll remind you, if you wanna go get some of these parts and get a discount on them, it's the ItzyBitzy SP32 with the PCB antenna. It's the LiPoly charger backpack for Trinket, ProTrinket, and ItzyBitzy. It's a 350 milliamp hour battery and that might be about it, yeah? Oh, and a little breakout, a little microbee breakout. Or maybe you wanna get the USB-C one and modify your case a little more. That's gonna do it. So use that coupon code PSX, so I'll get you 10% off in the Adafruit store. I've run long, it's time to go. Thanks everyone so much. Have a good one. Scott is gonna be doing a deep dive tomorrow, so stop by to check that out. We will be back on Tuesday with another product pick of the week. On Wednesday with a 3D Hangouts, a show and tell, Ask an Engineer, and lots, lots more on your Adafruit channels. Thanks everyone. I will see you next time. Goodbye. I'm gonna go play some Micromages.