Me, a noob at arduino need help to make game controllers

Hi, I'm making a game controller with Arduino nano. can someone please provide me with a proper tutorial on how to make it?
The parts I'm using are : -
Arduino nano (1x)
HC-05 (1x)
Push Buttons(10x)
Joystick module(2x).
(If I need to put more parts in the list, mention them too, but pls dont mention custom pcb.)
The controller should be compatible to play games like Blox fruits, Minecraft, more.
Pls if possible include the circuit diagram and the colors of the wires also. I checked in youtube, but there is a video called Arduino gamepad V2. But the video quality is bad so I did not understand anything.

Can you help me as fast as possible? Take your own time, but i need before 3 days pls? Because I am making it as a birthday gift for my cousin.
Thank you
Arjun
:blush::blush::blush::blush::blush:

Welcome It appears you purchase a bunch of parts and want to build something from them. I do not think it is possible for you to meet your deadline given your lack of experience. I suggest you pick something else and get a copy of the Arduino Cookbook and read it cover to cover. In the process you will find several projects you have parts for, give them a try.

That sounds like an interesting project that could be a lot of fun! However, please keep in mind that we are not a free design or code-writing service. We’re more than happy to help with your design or code, but we need you to make an initial attempt. Please design and write your code, then post it along with an explanation of what’s not working properly.

  1. Show Your Work First: Before asking for assistance, make an attempt to design or write the code yourself. Share your work along with details about what isn’t working.
  2. Provide Clear Documentation: Since we can’t see your project, share an annotated schematic (best) or a clear drawing of your setup. Pictures are welcome, but avoid using Fritzing diagrams as they are wiring diagrams, not schematics, and are not ideal for troubleshooting.
  3. Include Technical Details: If there is specific hardware involved, include links to technical information. There are often many versions of similar components, so precise details are essential.
  4. Reference Resources: For additional help, check out useful links and tutorials: Useful Links on Arduino Forum.
1 Like

LOL. Probably best to get your cousin a ready made gift to avoid disappointment. It's an interesting project, but I think you will need more than 3 days.

You are better starting with a Micro or Leonardo as these support USB HID. There are loads of tutorials out there, it's a popular project. It is unlikely that you would find a tutorial that exactly meets your need, but by following one you should be able to learn enough to apply it to your own. e.g. How to Emulate an Xbox Controller with Arduino (XInput) - Parts Not Included

Bad idea to buy parts you don't have a finished plan for and haven't done a few times already. Wherever you got that parts list, was there also a complete working set of plans and sources for everything else? I hope not "Instructables" as most of those are iffy at best!

3 days... if you found a finished version online the delivery can take longer if not Next Day.

I have arduino pro micro. I want to gift him. He loves diy products. I even have spray pained the outer case and designed it with blox fruits and minecraft theme.
I've attempted to do the circuit here is the connections i made--
vrx to a0
vry to a1
vcc to 5v
gnd to gnd
sw to d2

joystick 2---
vrx to a2
vry to a3
vcc-5v
gnd to gnd
sw to d3

push buttons
buttons 1,2,3,4,5,6,7,8,9,0 to d4,d5,d6,d7,d8,d9,d10,d11,d12,d13

bluetooth module---
tx to rx
rx to tx
vcc to 5v
gnd to gnd
Code: -
I don't know if its correct or not, but i took my father's help. He knows C++

#include <Joystick.h>

#define JOYSTICK1_VRX A0
#define JOYSTICK1_VRY A1
#define JOYSTICK1_SW 2
#define JOYSTICK2_VRX A2
#define JOYSTICK2_VRY A3
#define JOYSTICK2_SW 3

#define BUTTON1 4
#define BUTTON2 5
#define BUTTON3 6
#define BUTTON4 7
#define BUTTON5 8
#define BUTTON6 9
#define BUTTON7 10
#define BUTTON8 11
#define BUTTON9 12
#define BUTTON10 13

Joystick_ Joystick(JOYSTICK_DEFAULT_REPORT_ID,
JOYSTICK_TYPE_GAMEPAD, 10, 0,
true, true, false,
false, false, false,
false, false, false);

void setup() {
pinMode(JOYSTICK1_SW, INPUT_PULLUP);
pinMode(JOYSTICK2_SW, INPUT_PULLUP);

pinMode(BUTTON1, INPUT_PULLUP);
pinMode(BUTTON2, INPUT_PULLUP);
pinMode(BUTTON3, INPUT_PULLUP);
pinMode(BUTTON4, INPUT_PULLUP);
pinMode(BUTTON5, INPUT_PULLUP);
pinMode(BUTTON6, INPUT_PULLUP);
pinMode(BUTTON7, INPUT_PULLUP);
pinMode(BUTTON8, INPUT_PULLUP);
pinMode(BUTTON9, INPUT_PULLUP);
pinMode(BUTTON10, INPUT_PULLUP);

Joystick.begin();
}

void loop() {
int xAxis1 = analogRead(JOYSTICK1_VRX);
int yAxis1 = analogRead(JOYSTICK1_VRY);
bool joystick1Button = !digitalRead(JOYSTICK1_SW);

Joystick.setXAxis(map(xAxis1, 0, 1023, -512, 512));
Joystick.setYAxis(map(yAxis1, 0, 1023, -512, 512));
Joystick.setButton(0, joystick1Button);

int xAxis2 = analogRead(JOYSTICK2_VRX);
int yAxis2 = analogRead(JOYSTICK2_VRY);
bool joystick2Button = !digitalRead(JOYSTICK2_SW);

Joystick.setRxAxis(map(xAxis2, 0, 1023, -512, 512));
Joystick.setRyAxis(map(yAxis2, 0, 1023, -512, 512));
Joystick.setButton(1, joystick2Button);

Joystick.setButton(2, !digitalRead(BUTTON1));
Joystick.setButton(3, !digitalRead(BUTTON2));
Joystick.setButton(4, !digitalRead(BUTTON3));
Joystick.setButton(5, !digitalRead(BUTTON4));
Joystick.setButton(6, !digitalRead(BUTTON5));
Joystick.setButton(7, !digitalRead(BUTTON6));
Joystick.setButton(8, !digitalRead(BUTTON7));
Joystick.setButton(9, !digitalRead(BUTTON8));
Joystick.setButton(10, !digitalRead(BUTTON9));
Joystick.setButton(11, !digitalRead(BUTTON10));

delay(10);
}

He only knows C++ a bit, he took help of AI I assume

P.S. I forgot, I am going to use Unojoy software