Arduino-HomeKit-ESP32 icon indicating copy to clipboard operation
Arduino-HomeKit-ESP32 copied to clipboard

ESP Button For Multiple outputs

Open SaajanMaster opened this issue 4 years ago • 1 comments

How will i be able to connect multiple outputs with respective buttons? i've tried multiple ways. but it is not working properly. can you suggest the way ahead?

SaajanMaster avatar Jul 08 '20 05:07 SaajanMaster

Use ESPButton.add(id, pin, pin_down_digital); to add all your buttons and give them different id. (You can use the pin number as its idsimply) When one of your buttons is clicked, you can konw which one is clicked by checking the id in callback.

Mixiaoxiao avatar Jul 08 '20 06:07 Mixiaoxiao