I got a question related to pull up/down on input pins.
My project consists of 1 or 2 SNES pads connected to a teensy 2.0. They are communicating with the teensy via the SNES's simplistic serial protocol. From searching online I know that reading the input pin signals LOW for button presses (active low, I think is the term).
I was having issues yesterday when I unplugged the controller. The teensy would just start sending keyboard reports as if all buttons are pressed. It didn't dawn on me until later that the reason maybe that my input pin was registering LOW for an unconnected controller.
Am I on the right track here? And is the fix as simple as making sure my pinMode() for the input pin is INPUT_PULLUP?. That is, ensure that the pin always reads HIGH in all cases except when the button is pressed?
Thanks
My project consists of 1 or 2 SNES pads connected to a teensy 2.0. They are communicating with the teensy via the SNES's simplistic serial protocol. From searching online I know that reading the input pin signals LOW for button presses (active low, I think is the term).
I was having issues yesterday when I unplugged the controller. The teensy would just start sending keyboard reports as if all buttons are pressed. It didn't dawn on me until later that the reason maybe that my input pin was registering LOW for an unconnected controller.
Am I on the right track here? And is the fix as simple as making sure my pinMode() for the input pin is INPUT_PULLUP?. That is, ensure that the pin always reads HIGH in all cases except when the button is pressed?
Thanks