Requesting help making a super simple joystick input with Arduino Micro.

Hello! I am completely new at the whole arduino thing, i just got in contact with it due to that i need to have a separate usb-joystick.

I have bought a Arduino Micro after some hours on google where i found ut that i need either the Micro or the Leonardo to be able to have my pc recognize it as a gamepad.

I have also downloaded both the Joystick and Joystick2.0 library to be able to test the Micro out.

I've uploaded the test script from the library and when i short A0 to ground i can see in my pc that all the axis and buttons work but then i get stuck!

I have tried to google and i find alot of topics about just the joystick but none of them shows a simple script that i can continue working on.

What i really need is just two inputs, A0 and A1 to act as a joystick in my pc.

Can somebody point me in the right direction? What code do i need to have to make this work?

Thanks! :)

What joystick do you have? What is the resistance of the potentiometers? Not much information go go with, so not much in the way of answers can be given.

Paul

Zebonian_Justice: I've uploaded the test script from the library and when i short A0 to ground i can see in my pc that all the axis and buttons work but then i get stuck!

I have tried to google and i find alot of topics about just the joystick but none of them shows a simple script that i can continue working on.

What i really need is just two inputs, A0 and A1 to act as a joystick in my pc.

Can somebody point me in the right direction? What code do i need to have to make this work?

Thanks! :)

You're supposed to vary a resistance between the Analog Pin and Ground. A short is stick axis at the low end.

Try connecting a potentiometer between A0 and ground. Just about any dial on old electronics is a pot, only question is what is the range and you can measure that with a meter.

If you have an analog PC joystick that is not USB (pre-2000 maybe) then look up the pinout and connect that direct to your Arduino.. it will probably work.