maximkulkin / esp-homekit-demo

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

ESP32 - Use Button example for Toggle? #366

Closed kunjal83 closed 4 years ago

kunjal83 commented 4 years ago

Hi @maximkulkin, Is there a way in which Button example can be tweaked to use it as Toggle?

I tried using the Toggle directly on ESP-32 but am constantly getting an error. error: implicit declaration of function 'create_toggle'. Code i have added is ` at the top

include

and

if (create_toggle(button_gpio, button_toggle_callback)) { printf("Failed to initialize button"); }`

Thanks.