Unable to wake the XIAO ESP32C3 up from deep sleep with a PIR sensor

Cheers, now it works! Added longer delays and
gpio_sleep_set_pull_mode(GPIO_NUM_2, GPIO_FLOATING);

like this:

Serial.println("Going to sleep now");
  delay (1000);
  gpio_sleep_set_pull_mode(GPIO_NUM_2, GPIO_FLOATING);
  esp_deep_sleep_enable_gpio_wakeup(1 << INTERRUPT_PIN, ESP_GPIO_WAKEUP_GPIO_HIGH);
  delay (1000);
  esp_deep_sleep_start();

Thanks for all the help and best wishes for the New Year!

1 Like