Re: Problem wiring "KY040-like" encoder pushbutton to the board [solved]

Hi dear all! I can't properly wire the push button of the encoder to my Arduino. The device itself: |500x500 The ground of the encoder and the ground of the button are common according to the diagram below, so as far as I understand there is no place for pull down resistor to wire the button. |500x304

With this diagram there was no result as well: |500x426 Thank you in advance for any ideas!

The version with the external 10K pullup should work if the switch is normally open. Pin 8 should be LOW when the button is pushed. Post the code that did not work, maybe we can fix it. Why not enable the internal pullup on pin 8 (pinMode(8, INPUT_PULLUP) so the external resistor is not required.digin.jpg

groundfungus, Thank you very much for your reply! Just 15 minutes before your message I found the answer about internal pullups here. The button works fine now. Thanks a lot for clearing it up for me anyway!