#include "esp_sleep.h"
void setup() {
//Set GPIO 0 for wakeup HIGH (1)
esp_sleep_enable_ext0_wakeup(GPIO_NUM_0, 1);
// Go to sleep
esp_deep_sleep_start();
}
void loop() {
// Code here no
}
ESP32-C3-Zero - an error appears and the program cannot be compiled.
E:\ESP32_pgm\wakeUp_ESP32-C3-Zero\wakeUp_ESP32-C3-Zero.ino: In function 'void setup()':
E:\ESP32_pgm\wakeUp_ESP32-C3-Zero\wakeUp_ESP32-C3-Zero.ino:5:3: error: 'esp_sleep_enable_ext0_wakeup' was not declared in this scope; did you mean 'esp_sleep_enable_bt_wakeup'?
5 | void setup() {
| ^~~~~~~~~~~~
| esp_sleep_enable_bt_wakeup
exit status 1
Compilation error: 'esp_sleep_enable_ext0_wakeup' was not declared in this scope; did you mean 'esp_sleep_enable_bt_wakeup'?
When I change the board to "ESP32-WROOM-DA Module", the compilation goes without error.
Where can the error be?