My problem is that it is not working on my official ESP-C6 devkit. I read somewhere that the boot button is connected to GPIO0, and I don't have to do anything special to use it as GPIO0.
Code: Select all
#define EXAMPLE_BUTTON_GPIO 0
static void check_button(void* args)
{
static bool old_level = true;
bool new_level;
bool run_check_button = true;
initialise_button();
while (run_check_button) {
new_level = gpio_get_level(EXAMPLE_BUTTON_GPIO);
I tried to change
Code: Select all
#define EXAMPLE_BUTTON_GPIO 0
Code: Select all
#define EXAMPLE_BUTTON_GPIO 8