-
Notifications
You must be signed in to change notification settings - Fork 12
Added DS3231 RTC Featherwing #27
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
Conversation
I just tried a few things ona Particle Argon with the DS3231 Featherwing and ran into this - is something missing?
|
apparently
|
Oh, I wonder if the mktime() is board specific. I figured all of the time functionality was the same. I'll try on my argon and see what happens. |
Well, it was more of a nicety, so I can just remove that function. |
but on the feather_m4
|
It is a nice thing to have -- I wonder how how hard it is to get mktime into the nrf builds |
It has mktime on mine, but I'm running into some other oddities on the argon. It may or may not function with the ds3231 library itself. I'll try the nrf52840 express and see how that behaves. |
Yeah, I'm getting the same oddities on the nRF52840 Express. Something about tm_sec not existing, so I'll see if I can get it working on that board as well as the feather m4 express. |
Ok yeah, it looks like the bug is in the DS3231 library. I can't get that example to run either. |
you have mktime on your argon? that odd -- why don't I? |
Yeah, probably because I compiled the bootloader for it myself. |
its not from the Bootloader -- its in CP - what version of CP do you have? |
4.0.0 Beta 2 |
what build? this is current master for nrf52840 (actually yesterdays master) -- but it is the same now
|
For Argon: For nRF52840: Both have mktime() |
hmmm -- must have gotten removed since then ... |
Mine came from the releases tab off of github, yours appears to be compiled, but I could be wrong. |
yes - mine is built from the current master branch of the repo. |
this looks suspicious and it was part of the recent changes, I think |
Yeah, I got a message about that when attempting to run localtime() on mine even though the functions are all there.
|
AH -- they may have just been stubs. Not really implemented. |
Oh, ok. That would explain the odd functionality. |
so -- is the "unixtime' getter/seterr the only issue on the nrf boards? |
It's true there's no real rtc support in nrf yet. I turned it off for that reason, but it appears that there are helper functions needed by other stuff. Could you write this up as an issue for adafruit/circuitpython listing the specific missing functionality and I'll try to make it work again. |
No. The DS3231 library will not work at all on NRF boards. |
Thanks for chiming in Dan. Sure, I can write something up. |
I was able to read mine with rtc.now |
But it is in process: adafruit/circuitpython#1534 |
BTW -- Nice job on the library @makermelissa ! It makes the wing very easy to use! Thanks for creating it. |
Ok, maybe there's some newer code that is addressing this functionality that hasn't been released. |
Thanks Jerry. I'm aiming for code that's easy to use, but still very flexible and powerful. |
Since we now know the issue is really at the level of the DS3231 library or possibly even lower than that, I'm not really sure what to do since fixing the actual problem should propagate the fix to this library. |
It is not clear to me if there is a fundamental problem on the nrf boards supporting this library In my test, only the unixtime getter/setter seem to be an issue -- is it likely they will also work with a little magic by @dhalbert . If not, perhaps a try/except should be added for them so they can fail more gracefully. I guess it is not clear to me how using this library is impacted by the "builtin" etc module being implemented. Does that only impact the availability of mtkime/localtime? |
I have added the try/except blocks as you suggested. Please try it again when you have some time (no pun intended). Thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no concerns with the library so I'll go ahead and approve. There are still issues to be resolved with the nrf52840 but they are understood and in work and I don't think there is any reason to hold this up.
Updating https://github.com/adafruit/Adafruit_CircuitPython_FeatherWing to 1.5.0 from 1.4.0: > Merge pull request adafruit/Adafruit_CircuitPython_FeatherWing#27 from makermelissa/master
Ok, the next FeatherWing is done. I added some cool features such as the ability to change individual numbers instead of the entire time/date structure as well as a few other goodies like checking number of days and getting/setting by unix time.