 Today I'm going to start playing around with my arcade controllers here. So basically the first thing I'm going to do is I'm just going to get out one of the boards and some of the wires and hook just a button and maybe one of the joysticks up to it, plug it into my computer through USB and see if it works like it's supposed to. First things first, let's look at this controller board here. So there were really no instructions that I saw other than wiring of the button inside of things because there are two styles of buttons that should be pretty straightforward. So this is the board here and if we flip it over you can see it says USB and it says LED joystick and it says CY822B. So I'm going to do a Google image search on that and see if I can get the pin out. Although it should be pretty self-explanatory because there are pins with three pins, two pins and over here I think the only things that are confusing are this one and this one. One of them is going to be this one and this one, one's going to be the USB and one's going to be the joystick. They look like they're the same connection. They both have five pins. So that's my only real question and I might even say it on the board here. No, not really. But let's get a pin out online and see what we can figure out. Okay, so all you have to type in CY822B at Google and then click on images. This is like the first image that came up. I know you probably can't see it too well on the camera but it says here this is the USB cable. This one's for the joystick and then there's two pin joysticks. So I guess the joysticks also connects here and then these are LED powered push buttons on the side here and they're also labeled on the board K1, K2, K3, K4, L2, R2, L2, R1. That's where those two L2s, anyway. So I should be able to figure it out just by plugging things in. There's also other buttons up here, mode, turbo, clear, auto and then these joystick ones are up, down, right and left and then there's a five volt over here. It says external LED interface, the joystick LED light. So I guess there's a pin there for that. So let's go ahead and start playing around with this. First off, let's just hook up one of the push buttons and the USB cable and go give that a try on the computer. So I'll take this out here. So again, I also have this from, I ordered a while ago. These ones are a little bit cheaper. This one just has two connections on it because it's just a push button but since this set has LED lights there's four pins on the bottom. So let's go ahead, I'm going to look at this picture here that came with the kit to see what wires go where and then I'll plug that into the board. Hooked that button all up with the four wires. I just put it in the first push button pin which is labeled K1. Now I'll take the USB cable that this came with and plug it in. Of course, these plugs have little clips on them so they can only go in one way so you don't put them in backwards. Now I'm just going to go plug this in and theoretically since this is just a generic keyboard board, a keyboard board, joystick board, game controller board, it should show up as a generic game controller on my computer. I shouldn't have to install anything. So let's give that a try. Okay, I'm going to plug this into USB. Right away you see on the board here an LED light lighting up. Now the button is supposed to have LED lights. It seems like it only lights up when you press it, which I was hoping they'd be lit up all the time, but that's also pretty cool. So when you hit the keys, they light up. So let's go ahead and look at the software and make sure the computer is detecting the board and the presses. Okay, so I mentioned earlier this is a generic keyboard or, sorry, game pad. So you shouldn't have to install anything. That's as far as drivers. Obviously, you need generic joystick drivers installed, but most Linux systems are going to have those installed. Actually, most operating systems in general are going to have those installed already unless you have a very, very stripped down system. But to test the key but the joystick, we'll have to install some software. If it's not already installed, it might be on your small ray, but if we do sudo apt-get-install-joystick, it will install that package, which I already have installed. And next we can use the J scale. So if you only have one joystick hooked up, it's going to be under dev-input js-0. If you have two, the second one would be js-1, so forth and so on. And actually, before we do that, let's go ahead and run usb-list, I'm sorry, ls-usb. And you can see all my usb devices. This one right here, if you can read that through the camera, says Dragonrise Incorporated PC Twin Shock Gamepad. So that's one way to detect, so it seems to be checking that. See if I was to unplug the board, I'll unplug the board, I'll clear the screen and run that command again. You can see that doesn't show up in the list. So I'll plug it back in, I'll clear the screen and run that again, ls-usb and it shows up right there. Another thing you can do is list, and I'm showing this in the shell just because this is the way I prefer to do it. Obviously, there's GUI applications for this, but list dev inputs. So this will list all inputs from your machine by dash, we'll say id. And so that will list all input devices. You can see my mouse and keyboard listed here. And you can also see the Dragonrise Incorporated USB joystick listed twice because it has different functions, but that's just one device there. And you can see it says generic USB joystick. So let's go ahead and we will focus this a little bit, there we go. We will now run the calibration test, and I'm just running this just to make sure that I get inputs from that device. There's different ways you can do this, but again, I'll just say jscal-c for calibrate, and I will get the device, which in this case is dev slash input dash, or sorry, slash js-zero, I'll hit enter. Now the first part of this is trying to calibrate the actual joystick, which I don't have hooked up. I'm just going to wait here, I'm going to click the button, there we go. Now, if we look down at the bottom of the screen here, now we're calibrating the buttons, and you can see I'm pressing the button, and as I press the button, I'll bring this up here so you can see those too. As I press the button, it's detecting key presses. Now I'm calibrating it all wrong because I'm only pressing one button for everything, but I know that it's getting a signal, so it is working, which is great. Let's go ahead and hook up the joystick. Okay, here we go. I'll take the base unit with the module board on it, add it here, got there, and I have a second bag, I got a red and a blue, a little topper for it. Let's untie this cable first, and we will screw on the top here, if I can get it threaded. There we go. Okay. Doesn't seem to tighten down, seems to keep turning once it hits that bottom, but it's on there good. Okay, so now I have the board with the button ariana and the USB cable. Let's go ahead and take the wire that's already hooked up to the joystick here, and I will plug that into the joystick pins here. Now again, when I was looking at the pin out, there's other buttons here that are for joystick. There was an up-down, left-right, but I'm assuming that this board is just designed so it can work with different types of joysticks. This joystick only seems to have one set of pin outputs on it, which go straight through this ribbon cable to here, so I'm thinking that's all I have to do. So let's go ahead and hook this up, back up to the computer, run the calibration again, and see if it detects the joystick movements. Okay, here we go. Riding the same calibration test with the same board, have the same button, but also the joystick hooked up now. Run that, and oh yeah, it's definitely seem changing in numbers there. Let's go ahead and let it finish doing that. So now, oh yeah, so let me scroll the camera down here. It says move axis to zero minimum position and press any key, but you can see as I move it, so I move it on the one axis, so depending on which way I'm holding the joystick, I'll hold it this way. I'm going to push it to the left, that number goes to zero, when it's centered it's 127, and if I go to the right it's 255. Now, people have to realize that arcade controllers are very different than many game controllers for computers in that it's not pressure sensitive in that it doesn't matter how light or how soft I move this joystick, it's either on or off, so I'm going to move it to the left, and it's on to the left, if I go to the right it's on to the right, there's no moving it half way, but that's how old arcade games were in old Nintendo games and stuff like that. It wasn't move it a little bit and it moves a little bit, so you know this would be horrible for a flight simulator, but fine for your old arcade games that you probably be emulating. So it is definitely detecting it. So there we go. So I've only hooked up one button and the joystick, but it's easy enough to hook up the rest of the buttons, but I know that the board at least is working, and at least the joystick and one of the buttons is working. So in a future video, I'll be sure to hook this up the rest of the way, and give it a go, a test in some emulators and some other games. So I thank you for watching, and I hope you're enjoying these videos. If you are, be sure to check out my other videos. Check out my website. It's also by chris.com. That's chris-of-the-k. There should be a link in the description. There you can search through all my videos from both my channels. This channel is primarily a hardware video where we talk about things like this and a lot about microcontrollers and creating your own devices. And my other channel is mainly software based. I know this video sometimes hardware is kind of useless, electronic hardware without software. So here we looked a little bit at software, but just running commands, not actually writing anything out. But if you enjoy these tutorials, these videos, this one wasn't really a tutorial, it's an overview. Go ahead and check that out. Again, filmsbychris.com. That's chris-of-the-k. There should be a link in the description. If you do like my videos, and you watch them regularly, and you want to become a supporter, be sure to check out my Patreon page, patreon.com, forward slash mail x1000. There's a link to that in the description as well. Now if you can't support me financially, but you like my videos, be sure to like, share, subscribe, comment. All that stuff helps. The more viewers, the better. The more you interact with me, the better. So thanks again for watching, and as always, I hope you have a great day.