Making a game controler

i plan on making a game controller using the SparkFun Pro Micro - RP2040 link here I'm using python, I'm using 2 analog sticks and 16 buttons, four of the buttons are paddles that go on the back they have the same input as the A Y X and B buttons on an Xbox controller if you can post the full code and setting I would appreciate it thanks and yes I'm not using a Arduino if you can list the parts for a controller that does use an Arduino, preferably the pro micro and I also want it to be Bluetooth so add any parts that would be needed thank you

I don't want to code anything and I also ima need instructions on how I'm going to solder everything because I'm brain-dead by the way, you can try this project for yourself if you like :slight_smile: oh I forgot ima post the parts list here. Mini Pushbutton Switch x 2, Thumb Joystick - Deluxe x 2, Tactile Button - SMD (12mm) x 14, SparkFun Breadboard Power Supply Stick - 5V/3.3V x 1, SparkFun Pro Micro - RP2040 x1, that's it

You need a 3d printer to make the housing.

wrong part I got my stuff from the website spark fun the parts list is above your comment and also I don't have anything to get started with this project, not even a 3d printer I'm in 7th grade with not so much money this is for when I can make this

another thing if you can find some way to add addressable LEDs around the joysticks and buttons or just any where noticeable I would like it besides I want a controller that works well and looks good

Please read and follow this link: How to get the best out of this forum - Using Arduino / Project Guidance - Arduino Forum

Many forum helpers are highly knowing, skilled and experienced people. You need to do a better presentation to earn their attention. The solution is not producing lots of words.

on second thought im jst going to need the code ill deal with the hardware itself

You need to make the code. Likely nobody has made the code You need. It's not like playing with LEGO. Or maybe it is but the blocks used are enndless and all are different.

That's not how it usually works around here. Usually, users get help on a part of the code that they've already made, or on fixing a circuit that they've diagramed that is not performing as expected.

You should help yourself to begin with, then ask for specific help when you get stuck.

Start with google and see if anyone has published software for making an RP2040 game controller.

digitalWrite(LED_BUILTIN, !digitalRead(mySwitchPin));

the above makes the built in led blink when you press your button. Start from there and add as many lights and buttons as you want.

it seems this post is pointless

With no schematic or clear plan what kind of help were you expecting? Making an led respond to a button IS just one line of code. Define what you need and you might get some better help. You get out what you put in -- no effort on your part = not much effort on our part. Code derives from wiring. No wiring, no code. I've given you plans for a mounting case, an actual code example and, if you like, a wiring diagram for the joystick ×/button:


Being snotty is not a good way to get help.

1 Like

im aiming for the LEDs to be constantly on and the color can be changed using a knob on the back

Keep going ...

and i still need to connect all the buttons and anolog sticks

and also the joystick that you think I'm using will probably still work the same way as the joystick i actually plan on using ill come back soon but im in school

Can you hand draw a sketch? how many switches/led's/knobs/etc.? You have to count the number of IO's to select your CPU module & wiring. List each item you want, what it does, and what wires it needs, as a good start.
can you sketch what you expect it to look like physically? How are your fab skills & what major tools do you have access to? Does your school have 3D printers? Have you played with

ok but honest ly I'm not that good at modeling but i suppose il try to model something or maybe i can can just not add the LEDs i don't need them

let me say there are 2 analog switches, 2 push buttons, 14 normal buttons, and 1 knob. that's all the parts

Analog switches? You mean joysticks? thats two analog inputs and a digital each for a total of 4 AI and two DI.
Plus, knob is another AI
2 push buttons - two DI

What are "normal buttons"? Toggle switches? Latching push buttons? Well thats usually one DI each, for 14 more DI's for a total of ... umm ... 18 DI lines and at least five AI's. An UNO ain't going to cut it - not easily enough DI's. But port expanders can be used.
List & label each line and then you can assign pin numbers and create the io definitions in the code to match.
start with assigning names to each pin like this

const int anyPin = 3;  // whatever pin used
const int anotherPin = 4;

In setup() you'll use pinMode(anyPin, INPUT_PULLUP); to init each pin so no external pullup resistors are needed. All your switches should be NO (normally open) to ground. This implies that the selected input is LOW when active so test like this:

if ( !digitalRead( anyPin ) ) // switch pressed

The analog joysticks need +V and gnd as per the above drawing. Write in the pins you actually wire your stuff to.

Assign DO pins for your led's, use OUTPUT instead of INPUT_PULLUP in the pinMode() statements.

Try

for handheld controller 3D files