I'm currently building a controller to use on Windows. I'm very inexperienced with arduino and all the stuff like it.
Would this
work with a pro micro whilst using the button as a controller button wich sends a input to the pc?
So I basically want to controll the LED and get a Input on the PC with the same button.
DP switches won't work because of the limited space I got
Alright, thank you is it possible to do these two things at once? And with multiple button of such each one controls a LED and an input?
And do I connect the LED/ Button like in the video? With a resistor of course
Not at once, but it's like it was because the timing between the actions are microseconds.
Also possible, but limited to the available pins on the micro. I suggest you to implement one button first, then one LED and when everything works like you want, make it bigger.
Buttons from GND to a pin set as INPUT_PULLUP (the pin will read LOW when you press the button). LEDs can be connected from pin to GND with the appropriate resistor (which depends on the LED colour) in series, before or after the LED.
Below are two ways shown to control LEDs using switches. The usual way is buttons SW1 and SW2 and LEDs D1 and D2; this gives you the greatest flexibility. If you only want the LEDs to light up when the button is pressed you can use the approach as shown for SW3 and SW4 and D3 and D4.
With the approach taken for SW3 and SW4 you should never make D18/D19 outputs as that might cause a short if the output is high and you press the button.
With SW1 and SW2, you need to use pinMode(thePin, INPUT_PULLUP) to prevent floating inputs; this was mentioned by @Brazilino in post #5.
With SW3 and SW4 you do not need to use pinMode(thePin, INPUT_PULLUP) because R3/D3 and R4/D4 act as pull-ups.
There is not necessarily a relationship between SW1 and D1 and SW2 and D2; you can switch D1 on based on the status of SW1 or on the status of SW2 depending on your needs.
You will need to think what you want to achieve. E.g. if you need the flexibility to fade a LED using PWM you will need to use pins that support PWM (pins D3/D5/D6/D9/D10).
You haven't told us what you want to achieve in Windows when you press a button. If you want to control or start an application you can search the web for arduino button box.