Skip to content
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

CircuitPython RV3028 Implementation #40

Open
1 of 5 tasks
Mikefly123 opened this issue Oct 14, 2024 · 3 comments
Open
1 of 5 tasks

CircuitPython RV3028 Implementation #40

Mikefly123 opened this issue Oct 14, 2024 · 3 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@Mikefly123
Copy link
Member

Mikefly123 commented Oct 14, 2024

Planned Features

We're adding an rv3028.py to the CircuitPython lib folder and folding in use of the Real Time Clock into pysquared.py.

The primary things we want it to accomplish are as follows:

  • Get and Set the Time
  • Set and Check an Alarm
  • Check for Events Through the EVI Function
  • Manage the Trickle Charger
  • Sustain Time and Date Through Resets

Required Hardware

A FC Board V4b or higher or a BB V3b or higher is required to use the Real Time Clock.

@Mikefly123 Mikefly123 added enhancement New feature or request good first issue Good for newcomers labels Oct 14, 2024
@Mikefly123
Copy link
Member Author

Getting and Setting Time

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:

from pysquared import cubesat as c

print(c.time) # prints current time
c.time(hours, minutes, seconds) # sets current time

print(c.date) # returns current date
c.date(year, month, day, weekday) # sets current date

@dbgen1 dbgen1 self-assigned this Jan 18, 2025
@dbgen1
Copy link
Contributor

dbgen1 commented Jan 18, 2025

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:

c.time = (hours, minutes, seconds)
c.date = (year, month, day, weekday)

I will use the branch linked to this issue to continue the implementation of the RV3028 in pysquared.

@Mikefly123
Copy link
Member Author

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants