Description
Hello. I state that I am not a programmer. I am using your library and thank you for sharing it. I use it with an ESP32 that I would like to awaken from a deep sleep with a DS3231. The DS3231 is connected to ESP32 with SDA on pin 22 and SCL on pin 23. The SQW pin of the DS3231 to pin 32 of the ESP32. On the DS3231 I was able to correctly set both the time and the alarm for waking up. When ESP32 goes into deep sleep, a problem arises that prevents it from restarting at the time programmed on DS3231. It happens that when ESP32 goes into deep sleep the voltage goes from 0V to 3.28V and immediately reactivates ESP32 in a continuous loop and I cannot understand why. The DS3231 is powered directly from the 3.3v pin of the ESP32 which continues to supply current even when it goes into dormancy. This is my code.
import machine
from machine import Pin, I2C, RTC, lightsleep, wake_reason, idle
import utime
import time
import DS3231
i2c = I2C(sda = Pin(22), scl=Pin(23))
ds = DS3231.DS3231(i2c)
led = Pin (18, Pin.OUT)
led.value(1)
rtc = RTC()
import esp32
from time import sleep
sleep(10)
btn1 = Pin(32, Pin.IN, Pin.PULL_DOWN) # Normally low, high when pressed
esp32.wake_on_ext0(pin = btn1, level = esp32.WAKEUP_ANY_HIGH)
machine.deepsleep()
What could be the problem?
I thank you in advance.