I am using the clickButton library to read several buttons… works great; however, now that I’ve added a temperature and light sensor, I notice that during the sensor reading (each can take about 300-400ms), the code sometimes misses the click events (as they are just checked in the loop, not via interrupts).
I run the button.Update() between sensor readings (meaning, only read one sensor, then check buttons, then read the buttons again) which helps.
Sensors are read every 10 seconds. (i could make this longer, but like this interval and still won’t solve my issue).
I have tried using interrupts to read the clicks, but then have issues with debounce and lose the library features of multiple clicks, and worse, interferes with with library.
is there a click library that uses interrupts? or suggest some other solution?