1
0
mirror of https://github.com/mcgurk/Arduino-USB-HID-RetroJoystickAdapter synced 2024-11-21 08:35:05 -05:00

Update RetroJoystickAdapter.ino

This commit is contained in:
mcgurk 2016-10-05 20:27:59 +03:00 committed by GitHub
parent 4ebd957e1d
commit 062b5263fd

View File

@ -218,9 +218,9 @@ void setupJoysticks() {
const uint8_t inputlist[] = {0,1,2,3,5,8}; const uint8_t inputlist[] = {0,1,2,3,5,8};
for (int i=0; i < 6; i++) { for (int i=0; i < 6; i++) {
pinMode(inputPinsPort1[inputlist[i]], INPUT); pinMode(inputPinsPort1[inputlist[i]], INPUT_PULLUP);
pinMode(inputPinsPort2[inputlist[i]], INPUT); pinMode(inputPinsPort2[inputlist[i]], INPUT_PULLUP);
} } //without PULLUP every button are read as pressed down if controller is not connected.
pinMode(MODE_SELECT_PORT1, OUTPUT); pinMode(MODE_SELECT_PORT1, OUTPUT);
pinMode(MODE_SELECT_PORT2, OUTPUT); pinMode(MODE_SELECT_PORT2, OUTPUT);