Im using the joystick library but some buttons wont work

Hi there my name is Albert and I got a question:

I’m trying to code some sketch and it almost works except for the buttons I try to read at the Analog inputs.
For this I use the joystick library on my Arduino Leonardo.

Can some one give me some advice? and give me a reason why it refuses to work?

I tried:
“pinMode(A0, INPUT_PULLUP); //fire 8
pinMode(A1, INPUT_PULLUP); //start
pinMode(A2, INPUT_PULLUP); //credit”

or

“pinMode(14, INPUT_PULLUP); //fire 8
pinMode(15, INPUT_PULLUP); //start
pinMode(16, INPUT_PULLUP); //credit”

or

“pinMode(18, INPUT_PULLUP); //fire 8
pinMode(19, INPUT_PULLUP); //start
pinMode(20, INPUT_PULLUP); //credit”

non of the above works…

kind regards

Albert

Joystick_test.ino (3.98 KB)

Hi, Welcome to the forum.

Please read the first post in any forum entitled how to use this forum. http://forum.arduino.cc/index.php/topic,148850.0.html . Then look down to item #7 about how to post your code. It will be formatted in a scrolling window that makes it easier to read.

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

It would be helpful with troubleshooting to put some Serial,println statements in your code to track button values.

Thanks.. Tom... :)

Thank you I will try to post schematic and code today :D