Keypad
Keypad copied to clipboard
This library is incompatible with Raspberry Pi Pico (W)
As mentioned in previous issue, the macro added into Keypad.h is not working properly with INPUT_PULLUP mode - I made a test with Raspberry Pico W board. Please update library by removing this section (lines 38-54). Thank you in advance!
If using the Earlephilhower core on a Pico, it didn't work for me too.
I commented the entire block out and it works perfectly now. You can try it.
// Removed the block below so that it worked for Pico /* #ifndef INPUT_PULLUP #warning "Using pinMode() INPUT_PULLUP AVR emulation" #define INPUT_PULLUP 0x2 #define pinMode(_pin, _mode) _mypinMode(_pin, _mode) #define _mypinMode(_pin, _mode) \ do { \ if(_mode == INPUT_PULLUP) \ pinMode(_pin, INPUT); \ digitalWrite(_pin, 1); \ if(_mode != INPUT_PULLUP) \ pinMode(_pin, _mode); \ }while(0) #endif */
I'm pretty sure there's a neater way to do it.