-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Example/interrupt #57
Conversation
This is good work. It will serve the purpose very nicely. I see a few things to consider.
Thanks, David |
Thanks for the remarks. I took them into consideration and adjusted the code in the example. But did you accidentally read the code in the first commit and not the latest version? I had started out with an example using serial communication to indicate alarm interrupts, but then switched to the builtin LED for then you can test without a serial monitor. The current example should not contain any write statements to Serial anymore. The Best regards, |
I read the only code I could find. My own darned fault for not knowing how
to review PRs. Still new to using Github collaboratively.
Will look again for the latest version. Thanks!
…On Fri, Aug 5, 2022 at 2:32 PM jnuernberg ***@***.***> wrote:
Thanks for the remarks. I took them into consideration and adjusted the
code in the example. Clock is now myRTC and I corrected the comment
referring to alarm two (now alarm one, as used).
But did you accidentally read the code in the first commit and not the
latest version? I had started out with an example using serial
communication to indicate alarm interrupts, but then switched to the
builtin LED for then you can test without a serial monitor. The current
example should not contain any write statements to Serial anymore.
The delay(100) in the loop is placed there to emulate other important
code running and to slow down the loop. I changed the delay to 10 ms.
Best regards,
Jacob
—
Reply to this email directly, view it on GitHub
<#57 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIOVVUFV6GJUJN5477QXJDLVXVT4HANCNFSM55QHL5YQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I figured out how to view the latest version. Take comfort from this: even old dogs (like me) can learn! This one looks ready to go. I concur that 10 ms is a reasonable amount of time to simulate other code running. Think about it. AVRs execute one machine code instruction per clock cycle. During 10 ms the CPU of an Arduino having a 16 MHz clock, like most of them do, would execute 16,000,000 instructions / 1000 mSEc * 10 mSec = 160,000 machine code instructions. Feels roomy to me! |
Thanks to @jnuernberg for this and @IowaDave for reviewing. I have not used the square-wave (SQW) functionality of the DS3231 before, so also great to see this. Merging. |
Hi everyone,
After realising, that this library does not include an example, that uses interrupts, I created one.
I use alarm No. 1 of the DS3231 to trigger an interrupt every second and turn on and off the builtin LED of an Arduino.
This example could help on comments in issues #9 and #17.
Tested on:
@IowaDave, would you mind reviewing the code? If you find nothing to complain about, we may push ahead and merge.
Cheers, Jacob