OH MAAN, just encountered another problem
my switches are fine -working , then i connected the pushbuttons and its 100% the same code but it doesnt press a joystick button (testing with joy.cpl)
hte buttons are connected correctly (tested with digital read trough serial port)
Bounce button6 = Bounce(6, 10);
Bounce button7 = Bounce(7, 10);
Bounce button8 = Bounce(8, 10);
Bounce button9 = Bounce(9, 10);
Bounce button10 = Bounce(10, 10);
Bounce button11 = Bounce(11, 10);
Bounce button12 = Bounce(12, 10);
pinMode(6, INPUT_PULLUP); // Teensy++ LED, may need 1k resistor pullup
pinMode(7, INPUT_PULLUP);
pinMode(8, INPUT_PULLUP);
pinMode(9, INPUT_PULLUP);
pinMode(10, INPUT_PULLUP);
pinMode(11, INPUT_PULLUP);
pinMode(12, INPUT_PULLUP);
button6.update();
button7.update();
button8.update();
button9.update();
button10.update();
button11.update();
button12.update();
if (button6.fallingEdge()) {
Joystick.button(13, 1);
}
if (button7.fallingEdge()) {
Joystick.button(14, 1);
}
if (button8.fallingEdge()) {
Joystick.button(15, 1);
}
if (button9.fallingEdge()) {
Joystick.button(16, 1);
}
if (button10.fallingEdge()) {
Joystick.button(17, 1);
}
if (button11.fallingEdge()) {
Joystick.button(18, 1);
}
if (button12.fallingEdge()) {
Joystick.button(19, 1);
}
//
if (button6.fallingEdge()) {
Joystick.button(13, 0);
}
if (button7.fallingEdge()) {
Joystick.button(14, 0);
}
if (button8.fallingEdge()) {
Joystick.button(15, 0);
}
if (button9.fallingEdge()) {
Joystick.button(16, 0);
}
if (button10.fallingEdge()) {
Joystick.button(17, 0);
}
if (button11.fallingEdge()) {
Joystick.button(18, 0);
}
if (button12.fallingEdge()) {
Joystick.button(19, 0);
}
I just cant seem to find the mistake or reason for this not to work!
Any help is greatly appreciated!