playfultechnology / esp32-cam

Customisable camera control script for ESP32-CAM module - timelapse, flash, trigger control
27 stars 8 forks source link

Flash LED doesn't come on after sleep #2

Closed ScruffR closed 2 years ago

ScruffR commented 3 years ago

Since the sleep() function calls

  // Ensure the flash stays off while we sleep
  rtc_gpio_hold_en(GPIO_NUM_4);

any subsequent attempt to modify the pin settings will fail, resulting in the flash LED not coming back on again. To solve that you'd just need to execute rtc_gpio_hold_dis(GPIO_NUM_4); before trying to setup the pin again.

alastaira commented 2 years ago

Fixed in 951f9d8 - cheers!