So after some help from C6_trollbug I now have the wires setup correctly... unfortunately they are reversed i.e. rather than turning on when i press a button they turn off
Here is the code I am using...
void setup() {
pinMode(0, INPUT_PULLUP);
pinMode(1, INPUT_PULLUP);
pinMode(2, INPUT_PULLUP);
pinMode(3, INPUT_PULLUP);
}
void loop() {
// read the digital inputs and set the buttons
Joystick.button(1, digitalRead(0));
Joystick.button(2, digitalRead(1));
Joystick.button(3, digitalRead(2));
Joystick.button(4, digitalRead(3));
// a brief delay, so this runs 20 times per second
delay(50);
}