Closed dragosmacovei closed 3 years ago
If you want to count GPIO changes while in deep sleep, you may use the ULP coprocessor. You could write an ULP routine counting GPIO changes (= button port) while MCU is in deep sleep, and store counter in RTC memory. After wakeup of MCU, read result from RTC memory by MCU and send it to TTN.
How can I attach to ttgo t-beam a button (with internal pullup (and make it work with an interrupt? e.g count how many times the button was pressed). The problem is that I would like to be able to do this even if the board is sleeping (for example the board is sleeping, you press X times, but it will only use that data - e.g. send it to TTN - only after the board awakes).