Hi,
Description:
- Atmega328p that is in sleep mode with INT0 on.
- Momentary Button is connected to INT0 (pullup 4.7k res to 5v) and to ground.
Seeking:
- Upon pressing the button the device wakes from sleep. I'm looking to have RBD_Button do the debouncing as well at this point; however, I'm not sure it's working as it does when the device is in normal mode.
Question:
In reviewing your .h & .cpp files, it's unclear what the state of the _temp_state variable and the debounce_timer() would be coming out of sleep and already having the button pressed, it's not clear if these two states would be properly set to do the comparisons of the button status and _debounce_timer.isExpired().
Idea:
In the situation coming out of sleep, would it work to include in the ISR the following:
- _temp_state = false;
-_debounce_timer.restart();
My skills in Arduino are still just avg and not sure how to test this idea. That is, to do this in the sketch. Attempts have resulted in errors, I think because these are identified as private class in your library.
Thanks,
Hi,
Description:
Seeking:
Question:
In reviewing your .h & .cpp files, it's unclear what the state of the _temp_state variable and the debounce_timer() would be coming out of sleep and already having the button pressed, it's not clear if these two states would be properly set to do the comparisons of the button status and _debounce_timer.isExpired().
Idea:
In the situation coming out of sleep, would it work to include in the ISR the following:
-_debounce_timer.restart();
My skills in Arduino are still just avg and not sure how to test this idea. That is, to do this in the sketch. Attempts have resulted in errors, I think because these are identified as private class in your library.
Thanks,