maximkulkin / esp-homekit-demo

Demo of Apple HomeKit accessory server library
MIT License
808 stars 233 forks source link

ESP32 - Toggle #372

Closed kunjal83 closed 3 years ago

kunjal83 commented 4 years ago

Hi all,

I am trying to implement the Toggle example on my ESP32, however, it seems the input toggle isnt getting detected at all.

I have tried with External and internal pull up resistors however, in both the cases, input pins (Pin # 12 and 27) allows shows 0 Volts leading to no change being detected. --> This is when I am connecting this pin to 3.3v via a pull up (10K / 4.7K) / NOT Gate (to allow drain) OR to Ground terminal. Has anyone encountered any such trouble before?

I tried implementing the ISR event handler and with this it works fine.

Code for implementing the toggle is exactly identical to the one in Example for Toggle.

Any pointers is much appreciated.

Thanks.

renandw commented 4 years ago

Try to update your code with this library: https://github.com/maximkulkin/esp-button