DS3231 icon indicating copy to clipboard operation
DS3231 copied to clipboard

No Alarm Documentation

Open owenwastaken opened this issue 3 years ago • 13 comments

I am working with DS3231's alarm programming and there is no documentation. Can someone explain what these parameters mean?

setA1Time(byte A1Day, byte A1Hour, byte A1Minute, byte A1Second, byte AlarmBits, bool A1Dy, bool A1h12, bool A1PM);

owenwastaken avatar Apr 08 '21 14:04 owenwastaken

I appreciate your question. There was a time when I wondered the same thing. May I offer a tutorial I recently prepared on this subject? Your question inspired me to write it. See especially the section, "Step 3: Set an alarm on the DS3231". But also look at the references mentioned, and the example sketch. It demonstrates setting an alarm at ten-second intervals.

https://github.com/IowaDave/RTC-DS3231-Arduino-Interrupt

IowaDave avatar Oct 07 '21 03:10 IowaDave

Hi @owenwastaken,

For Alarm 1 (for the registers and bits, refer to the datasheet, page 11):

  • byte A1Day -- Day to match for alarm -- Register 0Ah bits 0-6
  • byte A1Hour -- Hour to match for alarm -- A9h bits 0-4
  • byte A1Minute -- Minutes to match for alarm -- A8h bits 0-6
  • byte A1Second -- Seconds to match for alarm -- A7h bits 0-6
  • byte AlarmBits -- Mask bits for matching of Alarm -- Bits A1M1 through A1M4
  • bool A1Dy -- Match Date or Day of Week -- Bit 0Ah DY/DT
  • bool A1h12 -- 12 or 24 h time -- Bit 09h 12/24
  • bool A1PM -- AM or PM in 12h time -- Bit 09h AM/PM

Hope this helps, best regards,

Jacob

jnuernberg avatar Jul 20 '22 14:07 jnuernberg

Thanks @IowaDave and @jnuernberg! I'm very short on time to maintain and document this repository these days, but if you find it useful, would it be helpful for me to give you write access here so you can include your documentation right with the library itself?

awickert avatar Jul 26 '22 12:07 awickert

Happy to help.

How would you like me to submit content? Git push followed by a PR? Or just write directly to the repo?

I imagine the material could benefit from a rewrite to focus on the library and the datasheet for the part. Your thought?

Appreciatively,

David

On Tue, Jul 26, 2022 at 7:30 AM Andy Wickert @.***> wrote:

Thanks @IowaDave https://github.com/IowaDave and @jnuernberg https://github.com/jnuernberg! I'm very short on time to maintain and document this repository these days, but if you find it useful, would it be helpful for me to give you write access here so you can include your documentation right with the library itself?

— Reply to this email directly, view it on GitHub https://github.com/NorthernWidget/DS3231/issues/42#issuecomment-1195420408, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIOVVUFYLCEZ42YXJCJSNLDVV7K5PANCNFSM42TA4EGQ . You are receiving this because you were mentioned.Message ID: @.***>

IowaDave avatar Jul 26 '22 14:07 IowaDave

Hi @awickert, Thank you! Happy to help myself.

Time for me as well is the limiting factor. I will opt for a fork and PRs, when I have something to contribute. Until then, I'll help out on the comments and issues whenever I find my 5 minutes of time.

@IowaDave I will of course support you, in case you decide to opt for a rewrite.

Jacob

jnuernberg avatar Jul 27 '22 20:07 jnuernberg

Hi @IowaDave David and @jnuernberg Jacob,

Thank you very much for your willingness to help document this repo, and I am glad that it's been helpful enough for you that you feel it would be worthwhile.

The current README is quite minimalist. I trust that whatever you create would be better! This library is a community resource, and was something that I modified from a professor at Chico State's code around a decade ago. So you should also feel free to make it fully your own.

I'm the one who is appreciative here! Expanding this library and seeing all those who have used it has been fantastic, but more than I can manage to support. Thank you.

And you both should now have write access; let me know if you do not.

awickert avatar Jul 27 '22 22:07 awickert

We're on it!

Understood that the README is home base for the documentation. Will approach it that way.

On Wed, Jul 27, 2022 at 5:25 PM Andy Wickert @.***> wrote:

Hi @IowaDave https://github.com/IowaDave David and @jnuernberg https://github.com/jnuernberg Jacob,

Thank you very much for your willingness to help document this repo, and I am glad that it's been helpful enough for you that you feel it would be worthwhile.

The current README is quite minimalist. I trust that whatever you create would be better! This library is a community resource, and was something that I modified from a professor at Chico State's code around a decade ago. So you should also feel free to make it fully your own.

I'm the one who is appreciative here! Expanding this library and seeing all those who have used it has been fantastic, but more than I can manage to support. Thank you.

— Reply to this email directly, view it on GitHub https://github.com/NorthernWidget/DS3231/issues/42#issuecomment-1197435690, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIOVVUBZMFX6X4556CXAW5TVWGZM7ANCNFSM42TA4EGQ . You are receiving this because you were mentioned.Message ID: @.***>

IowaDave avatar Jul 27 '22 22:07 IowaDave

Thank you.

And PR if you want to prevent clashes, but otherwise, feel free to edit directly.

And just do what makes the most sense to you; it probably will to a bunch of other folk too.

awickert avatar Jul 27 '22 22:07 awickert

Hi there. Some PRs pending. Do you want to be the Approver on them? Or do you want Jacob and me to go ahead and merge our changes?

Thanks!

On Wed, Jul 27, 2022 at 5:49 PM Andy Wickert @.***> wrote:

Thank you.

And PR if you want to prevent clashes, but otherwise, feel free to edit directly.

And just do what makes the most sense to you; it probably will to a bunch of other folk too.

— Reply to this email directly, view it on GitHub https://github.com/NorthernWidget/DS3231/issues/42#issuecomment-1197455785, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIOVVUBTG3RKOLZQT3XR2SLVWG4IBANCNFSM42TA4EGQ . You are receiving this because you were mentioned.Message ID: @.***>

IowaDave avatar Aug 06 '22 19:08 IowaDave

I'm very happy for the two of you to manage the PRs and take full control. In fact, this is my preference -- I'd rather not feel the possibility of slowing you down! But since I'm here anyway right now, I'll have a quick look :)

awickert avatar Aug 08 '22 07:08 awickert

Merged @IowaDave's docs, but keeping this Issue open because these don't yet include the answer to @owenwastaken's question.

awickert avatar Aug 08 '22 07:08 awickert

Very well. Jacob and I will exercise the discretion to merge. We'll monitor it for PRs from other contributors also. To be clear, it's still your repo, and we're grateful to you for providing it to the community.

David

On Mon, Aug 8, 2022 at 2:08 AM Andy Wickert @.***> wrote:

I'm very happy for the two of you to manage the PRs and take full control. In fact, this is my preference -- I'd rather not feel the possibility of slowing you down! But since I'm here anyway right now, I'll have a quick look :)

— Reply to this email directly, view it on GitHub https://github.com/NorthernWidget/DS3231/issues/42#issuecomment-1207748833, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIOVVUHBDSL2URAJ52MDACLVYCW47ANCNFSM42TA4EGQ . You are receiving this because you were mentioned.Message ID: @.***>

IowaDave avatar Aug 08 '22 12:08 IowaDave

Thank you, but it is in fact simply my modification and splice of work by Eric Ayars and @jeelabs, and is licensed totally without conditions: https://github.com/NorthernWidget/DS3231/blob/master/LICENSE

So it is all of ours, and living here per history and convenience of location :)

awickert avatar Aug 09 '22 10:08 awickert

PR #70 adds extensive documentation for the Alarms. It is open for review by developers as of mid-September 2022. Hope to merge it soon. Thanks for your patience!

IowaDave avatar Sep 15 '22 03:09 IowaDave

Closing this Issue on 18Sept2022 because alarm documentation has been added to the repository. See Alarms.

IowaDave avatar Sep 18 '22 14:09 IowaDave