Page 1 of 1

ESP32C3 + SHTC3 sensor - no measurement after deep sleep

Posted: Sun Feb 23, 2025 11:03 am
by elspiryto
Hello,
using ESP32C3 I wanted to get temperature and humidity data from SHTC3 sensor + send via MQTT and everything is working fine when I will use loop function for this, but if I want to migrate to deep sleep the data are gathered only once after USB reconnect. After the chip will woke up from deep sleep the I2C do not provide new measurements. I'm stuck since 2 days so i decided to ask more experienced people. Did anyone have such issue :?: I tried to somehow reset the, I2C but it didn't solve the issue :roll:

Re: ESP32C3 + SHTC3 sensor - no measurement after deep sleep

Posted: Mon Feb 24, 2025 8:17 pm
by elspiryto
After 3 days investigation here is the solution:

Code: Select all

  // Put sensor into wake state before deep sleep
  shtc3.sleep(false);

  // Entering sleep mode
  esp_sleep_enable_timer_wakeup(SLEEP_TIME);
  esp_deep_sleep_start();
Now the full code is working as expected. :geek: