You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So far, I have already added this functionality in Commit #be88cd7 it just now needs to be tested!
You should be able to do the following:
frompysquaredimportcubesatascprint(c.time) # prints current timec.time(hours, minutes, seconds) # sets current timeprint(c.date) # returns current datec.date(year, month, day, weekday) # sets current date
I holistically tested getting and setting the time. With my changes, the implementation is correct and the driver is fully functional. There was a small issue in the way the property was being utilized, as per the python docs, the setter property can only take one argument, so this was corrected in 2d028e3. The time and date are accessed the same way, but can now be set using the setter function with:
Thanks for this @dbgen1! You may want to go ahead and do a pull request to get that setter change merged before dev goes too far ahead. Let me know if you need some more implementation notes for how to bring in all the other features.
Now that I think about it, with the way that Nate has restructured library imports, I think we should make a new repo in the PROVES Kit Organization specifically for a CircuitPython RV3028 Library. We could maybe even contribute it upstream once it is done!
Planned Features
We're adding an
rv3028.py
to the CircuitPython lib folder and folding in use of the Real Time Clock intopysquared.py
.The primary things we want it to accomplish are as follows:
Required Hardware
A FC Board V4b or higher or a BB V3b or higher is required to use the Real Time Clock.
The text was updated successfully, but these errors were encountered: