rwmingis / InterruptButton

This is an interrupt based button event library for the ESP32. It enables binding user defined actions to button events including 'Key Down', Key Up' , 'Key Press', 'Long Key Press' 'AutoRepeat Press' and 'Double-Click'. The actions associated it these events may be executed Asynchronously, Synchronously, or a Hybrid between the two.
MIT License
30 stars 8 forks source link

Unable to attach to INPUT-only pins #1

Closed vortigont closed 2 years ago

vortigont commented 2 years ago

esp32 has 4 INPUT-only pins 34,35,36,39 that can't be set with PULLUP or PULLDOWN due to this condition those pins are not working for this lib.

void InterruptButton::begin(void){
  if(m_pinMode == INPUT_PULLUP || m_pinMode == INPUT_PULLDOWN) {}

https://github.com/rwmingis/InterruptButton/blob/13d009f9ccbed23c01cef76a6a42256340f252a3/InterruptButton.cpp#L28

might be possible to add || m_pinMode == INPUT here to use those pins also?

rwmingis commented 2 years ago

Yep, good catch, have done just that and updated. Cheers. Will leave to the user to implement correctly.

vortigont commented 2 years ago

Thanks for quick fix! Nice, lib you have here, BTW :)

rwmingis commented 2 years ago

No worries, thanks for the kind words!

On Wed, 2 Feb 2022 at 08:36, vortigont @.***> wrote:

Thanks for quick fix! Nice, lib you have here, BTW :)

— Reply to this email directly, view it on GitHub https://github.com/rwmingis/InterruptButton/issues/1#issuecomment-1027310993, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALW24E5IVS337RBBFEVPQXTUZBG5BANCNFSM5NHDXPVQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you modified the open/close state.Message ID: @.***>