Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This library is incompatible with Raspberry Pi Pico (W) #47

Open
mwwojcik2017 opened this issue Nov 20, 2023 · 1 comment
Open

This library is incompatible with Raspberry Pi Pico (W) #47

mwwojcik2017 opened this issue Nov 20, 2023 · 1 comment

Comments

@mwwojcik2017
Copy link

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!

@VkBoit
Copy link

VkBoit commented Feb 2, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants