From bbb6f440ea0417c6fa9eca4b22780de61083ee4e Mon Sep 17 00:00:00 2001 From: Alex Ong Date: Wed, 31 Oct 2018 11:43:53 +1100 Subject: [PATCH] NES/SNES Input pins changed to Pullup There was noisy random input. Setting to pullup alleviates this. --- RetroJoystickAdapter.ino | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RetroJoystickAdapter.ino b/RetroJoystickAdapter.ino index 2d1ea0a..091cf3c 100644 --- a/RetroJoystickAdapter.ino +++ b/RetroJoystickAdapter.ino @@ -319,10 +319,10 @@ void interpretJoystickState(uint8_t j, uint8_t *status) { void setupJoysticks() { pinMode(LATCH1, OUTPUT); pinMode(CLOCK1, OUTPUT); - pinMode(DATA1, INPUT); + pinMode(DATA1, INPUT_PULLUP); pinMode(LATCH2, OUTPUT); pinMode(CLOCK2, OUTPUT); - pinMode(DATA2, INPUT); + pinMode(DATA2, INPUT_PULLUP); } #define latchlow digitalWrite(LATCH1, LOW); digitalWrite(LATCH2, LOW);