SimpleButton icon indicating copy to clipboard operation
SimpleButton copied to clipboard

missing INPUT_PULLDOWN

Open homonto opened this issue 3 years ago • 0 comments

hi, in case of button to be active HIGH, there should be proper way of pulling down the pin there is nothing I could find like this in your code so I had to add it manually maybe it would be good to have such functionality (when inverted make it pull down)?

or maybe I am not doing it properly?

papio@MBP16papio SimpleButton % grep -R PULL * examples/PullupButton/PullupButton.ino: // ButtonPullup will do "pinMode(12, INPUT_PULLUP)" isntead of "pinMode(12, INPUT)". src/Buttons/PS2Gamepad.cpp: pinMode(dataPin, INPUT_PULLUP); src/Buttons/ButtonPullup.cpp: pinMode(button_pin, INPUT_PULLUP); src/libs/MCP23017.cpp: setPinMode(pin, pullup ? INPUT_PULLUP : INPUT); src/libs/MCP23017.cpp: bool input = (mode == INPUT || mode == INPUT_PULLUP); src/libs/MCP23017.cpp: bool pullup = (mode == INPUT_PULLUP); src/libs/MCP23017.cpp: if (pullup) return INPUT_PULLUP; papio@MBP16papio SimpleButton %

homonto avatar Nov 10 '22 10:11 homonto