add ds3231 alarm

RP2040 based microcontroller boards running MicroPython.
Target audience: MicroPython users with an RP2040 boards.
This does not include conventional Linux-based Raspberry Pi boards.
Post Reply
danjperron
Posts: 51
Joined: Thu Dec 27, 2018 11:38 pm
Location: Québec, Canada

add ds3231 alarm

Post by danjperron » Sun Aug 14, 2022 2:03 pm

I just download Peter Hinch micropython-samples.

Thanks Peter for your very good samples.

Ok I'm just trying to learn how to do deep sleep with the timer ds3231 but the ds3231 library doesn't have the alarm set.
Then I added the functions to his library for the alarm 1 and 2. I didn't put it on github yet but it is on pastebin

modification from Peter ds3231_port.py. https://pastebin.com/N4Cxesmp

I connect Pin3 of the DS3231 to GP14 of the Pico. https://pastebin.com/QZ4EafyY
and the test script.

Everything works!. Now I will need to add the clock output function,the acknowledge interrupt and figure out how to do deepsleep with it.

Post Reply