- This topic has 4 replies, 4 voices, and was last updated 9 months, 2 weeks ago by
LillianSkye.
-
AuthorPosts
-
-
12 November 2024 at 15:50 #31806
#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?
-
13 November 2024 at 15:16 #31824
Hi Elkez,
you must importesp_sleep.hlib.#include <esp_sleep.h>Bye Renzo
-
19 November 2024 at 14:09 #31831
That didn’t help, Zero doesn’t support this command.
It is necessary to use the command:
esp_deep_sleep_enable_gpio_wakeup(1 << INTERRUPT_PIN, ESP_GPIO_WAKEUP_GPIO_HIGH); -
2 January 2025 at 06:48 #32015
Encountering compilation errors with the ESP32-C3 Zero can be challenging. Ensure your development environment is up-to-date, including the latest board definitions and libraries. If issues persist, consider exploring alternative microcontrollers like the STM32L152RBT6, an ultra-low-power ARM Cortex-M3 MCU with 128 KB Flash memory and advanced peripherals, suitable for various applications. This might better align with your project’s requirements and provide a more stable development experience.
-
14 January 2025 at 08:48 #32058
Thank you so much for the info.
-
This reply was modified 9 months, 2 weeks ago by
LillianSkye.
-
This reply was modified 9 months, 2 weeks ago by
LillianSkye.
-
This reply was modified 9 months, 2 weeks ago by
-
-
AuthorPosts
- You must be logged in to reply to this topic.



