Beginners guide to game controllers with Arduino

Sdílet
Vložit
  • čas přidán 6. 06. 2024
  • In this video I'll cover some of the basics of building a game controller with Arduino and test out the Xinput library to see if I can get rumble working for my project!
    This is 4th video in the ZenDeck series so make sure you check out the previous videos if you're new to the project!
    Links mentioned in the video:
    Arduino XInput Tutorial: www.partsnotincluded.com/how-...
    Pre-made controller software for Arduino and Pico:
    Ardupad controller software: github.com/dmcke5/Ardupad
    GP2040-CE: gp2040-ce.info/
    Customize your designs with Cheap & quick PCB/3D printing/CNC machining at PCBWay: www.pcbway.com/
    Join the discord! / discord
    Follow me on Twitter! / cncdan
    Help support the channel!
    www.buymeacoffee.com/cncdan
  • Věda a technologie

Komentáře • 25

  • @flareblitz2466
    @flareblitz2466 Před 17 dny

    It's one thing to build an amazing project, but it's another to make it more accessible to others. Keep up the amazing work!

  • @alexanderscholz8855
    @alexanderscholz8855 Před 21 dnem +5

    You are AWESOME 👍😎‼️

    • @cncdan
      @cncdan  Před 21 dnem +1

      Thanks! Hope it helps someone at least!

  • @andrianbaka2838
    @andrianbaka2838 Před 21 dnem +2

    Yo that will help me alot with my handheald project. Keep the work up man, love the content

    • @cncdan
      @cncdan  Před 21 dnem +1

      Glad its helpful to you!

  • @TommyBee456
    @TommyBee456 Před 21 dnem +3

    its crazy that I have been looking into all this stuff and now you make a video on it! haha. However I am stubborn so I have been sticking with the rp2040 and getting it to do xinput. I only recently was able to get some basic code working but it is promising! that being said it is much more complex because it isnt arudino anymore and I am using the pico-sdk directly with adafruit's tinyUSB library. I dont really know what im doing lmao

    • @cncdan
      @cncdan  Před 21 dnem +1

      I really wanted to use the rp2040 too, but I'm too short on time to try and learn how to make it work right now. I'm hoping that in the meantime someone else will work it out and I can swap over to it in a future revision 🤣 I've used the 32u4 in controllers previously, and the only real sacrifice I've had to make is in the resolution of the joystick LUT's since I won't have enough memory to store them otherwise. But in practice, it is completely undetectable so it really doesn't bother me!

  • @rogue-xm4690
    @rogue-xm4690 Před 21 dnem

    Thank you for this guide ! I was searching for this kind of guide ! It might be great to make a video on how to make controller handle on Fusion 360 😁

    • @cncdan
      @cncdan  Před 21 dnem +1

      I'll keep it in mind as an idea for a future video!

  • @stonededge
    @stonededge Před 21 dnem +3

    First baby

  • @AdityaSingh-ij4ph
    @AdityaSingh-ij4ph Před 20 dny

    Awesome tutorial at the best timing for me. Hoping to build this in these holidays. One thing I'm confused in is the official rp pico has 3 analog inputs, then how did you figure out to connect 4 analog inputs ( 2 for each joystick). Most forums simply say to use an external ADC. Any guidance would help😃

    • @cncdan
      @cncdan  Před 20 dny +1

      Yeah that's pretty much your best bet. I used a Pico on my previous NUC based handheld. I just used a basic atmega328p (the same cheap microprocessor found in the Arduino Uno, Nano etc) and had it handle the other half the controller and then communicate with the pico over i2c so the pico could then turn it into USB input for the PC. So it was basically like a programable IO expander. Worked very well so that's what I'll be doing this time too, even though the 32u4 has enough IO for a whole controller. It just means less wiring betwen the two halves of the controller!

    • @AdityaSingh-ij4ph
      @AdityaSingh-ij4ph Před 20 dny

      Oh yeah now i recall the usage of that ic communicating over i2c with the pico as you mentioned. That was a really nice workaround you have done there. Thanks a lot for the help😄.

  • @aronabonyi9074
    @aronabonyi9074 Před 21 dnem +1

    The little trackpad will be connected directly to the main board, or the micro? What interface does it use? (this will be so cool man...)

    • @cncdan
      @cncdan  Před 21 dnem

      I did an episode on the trackpad two videos ago, so you can check that out if you need more info but basically it's just an i2c device so I'll need a micro controller in between it and the computer. It will probably just end up being a second micro that's separate to the controller one. The second micro will also talk to some software I'm going to make for the PC which will allow you to customise the joystick LEDs and maybe even have a couple of different "modes" for the track pad like the Steam deck!

    • @aronabonyi9074
      @aronabonyi9074 Před 21 dnem

      @@cncdan i check it out thanks!

  • @SeanJCheevers
    @SeanJCheevers Před 21 dnem

    Hi I just thought id say thank you for all your videos, I've never build a handheld gaming pc before but i have build many gaming pc's and laptops mainly with off the shelf parts and I have also created custom ps3/ps4/ps5 as portables and micro consoles. However I am now looking at building my own handheld and your videos have been a great help which is why im subscribed. I have bought a handheld but its not as good as i would l;ike so now i am looking at making my own handheld run with a latte-panda Mu but i have no idea how to do a controller so this video helped and if you could show how to create and wire it in another video it would be super helpful, I was also thinking of asking PCB-way for their help in creating a custom pcb for it, do you know what i need or what they would and wouldn't do? Anyway thank you for all your help your amazing ! :)

    • @cncdan
      @cncdan  Před 21 dnem

      I did cover some basic wiring stuff towards the end of the video, it really is as simple as that. If you follow the link to the github page for my controller code I have a whole list of which pins to connect to which buttons so all you really need to do is copy that and flash the code up and you'll have a working controller! Services like PCBway are just for producing PCB's, not helping you design them. They will perform some basic checks on your designs to ensure they can actually produce them, but they won't be able to help you with your design beyond that. Download KiCad, its probably the most popular PCB design software for hobbiests. There's heaps of tutorials online for it. It will be a steep learning curve but there's no better feeling than having your first PCB's turn up in the post!

    • @SeanJCheevers
      @SeanJCheevers Před 21 dnem

      @@cncdan Thank you for the advise and help, when it is done I will make sure to show you :)

  • @toutatra
    @toutatra Před 18 dny

    can you make an detachable controller like the switch then il become an wireless controller
    but yea this is my idea :))))) thanks !

  • @gyrenrockz
    @gyrenrockz Před 19 dny

    No start and select buttons yet?

    • @cncdan
      @cncdan  Před 18 dny

      The design is still a work in progress. I am pretty close to having it all finished now so the next time you see it, it should have the rest of the buttons added!

  • @StudioKelpie1993
    @StudioKelpie1993 Před 21 dnem

    ... Why does it look suspiously like a Lenovo Legion Go?

    • @cncdan
      @cncdan  Před 21 dnem +1

      I guess because there's only so many different ways to cram the same handful of components into a package of this size/shape. IMO the Legion Go is one of the ones it looks the least similar too. I've taken design inspiration from a couple of different handhelds and combined the parts I like to make something unique that fits my needs.