LightningPiggy / lightning-piggy

LILYGO TTGO T5 2.13 and 2.66 inch DEPG ePaper Display
https://www.lightningpiggy.com/
GNU Lesser General Public License v2.1
6 stars 4 forks source link

Feature Request: "Shake-to-Refresh" #13

Closed BenGWeeks closed 1 month ago

BenGWeeks commented 4 months ago

Rather than a "Shake-to-wake", it would be good if this was a "Shake-to-refresh" which makes it more clear if your battery is dead or not as well.

ThomasFarstrike commented 4 months ago

I like this idea, and I think the plan was indeed to add some functionality to the tilt sensor input pin, even when the device is already awake.

To move in this direction, I reworked the code to do periodical (every 15 minutes) refreshes if it stays on.

Next step would be to implement an interrupt handler for the tilt sensor input pin (see https://deepbluembedded.com/esp32-external-interrupts-pins-arduino-examples/). Then in that interrupt handler, set some variable like forceBalanceAndPaymentsRefresh=true, add "forceBalanceAndPaymentsRefresh==true" to the refresh check in the loop() and don't forget to set forceBalanceAndPaymentsRefresh=false to mark it as done.

ThomasFarstrike commented 1 month ago

I think this is done, I forgot to close this issue!