How do I attach analog sticks, buttons and potentiometers and turn them into PC input, so like turn my arduino into a pc gaming device? and if so, how would I add universal input for any application/game???
Start with the tutorials, and example scripts.
have you loaded any example scripts onto your arduino yet?
Have you written any scripts yet?
It may be a longer process to get from here to there than you might think. Have patience, and persistence.
As far as a universal input for games, you can emulate a USB device with some Arduino hardware so you could send (for example) mouse movements via pots.
Tim
how would I add universal input for any application/game
Enthusiasm is one criteria
Buttons/switches are easy to read. Set them up in setup(), read them in loop(), take an action:
void setup(){
pinMode (2, INPUT_PULLUP);
}
void loop(){
if (digitalRead(2) == LOW){
// button is pressed (connecting 2 to Gnd), do some action
}
}
Reading pots is similar
int analogInput = analogRead(A0);
// do some action based on value read
The complicated part is deciding what to do with the inputs once you've received them.