ESP32-C3 - Double use for RST button
Posted: Sun Apr 30, 2023 12:01 am
Hi forum,
I have an esp32-c3-wroom-02 based board with 2 buttons, one for boot loader and one for reset. I'm able to put my controller into download mode to upload my code by pressing the RST button while pressing the boot button.
This works fine. However, I need to be able to associate a piece of code to the RST press. Seeing as the RST is part of the controller logic, a single press will restart the controller. I was wondering if maybe I could detect a long press and associate a function with it.
Any idea if this is possible?
I have an esp32-c3-wroom-02 based board with 2 buttons, one for boot loader and one for reset. I'm able to put my controller into download mode to upload my code by pressing the RST button while pressing the boot button.
This works fine. However, I need to be able to associate a piece of code to the RST press. Seeing as the RST is part of the controller logic, a single press will restart the controller. I was wondering if maybe I could detect a long press and associate a function with it.
Any idea if this is possible?