https://github.com/ekspla/micropython_rx-8035
A Micropython Driver for Seiko Epson's RTC, RX-8035SA/LC.
https://github.com/ekspla/micropython_rx-8035
epson i2c micropython python rtc rx8035 seiko
Last synced: about 1 month ago
JSON representation
A Micropython Driver for Seiko Epson's RTC, RX-8035SA/LC.
- Host: GitHub
- URL: https://github.com/ekspla/micropython_rx-8035
- Owner: ekspla
- License: mit
- Created: 2024-09-10T22:27:35.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2025-02-04T07:11:25.000Z (2 months ago)
- Last Synced: 2025-02-04T08:20:17.347Z (2 months ago)
- Topics: epson, i2c, micropython, python, rtc, rx8035, seiko
- Language: Python
- Homepage:
- Size: 13.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-micropython - micropython_rx-8035 - A MicroPython Driver for Seiko Epson's RTC, RX-8035SA/LC. (Libraries / Communications)
README
# micropython_rx-8035
SEP. 2024 eksplaA MicroPython I2C Driver for Seiko Epson's 5-ppm RTC, RX-8035SA/LC.
## Basic Usage (see docstrings in the code for details.)
``` Python
>>> import machine
>>> i2c = machine.I2C(0)
>>> print([hex(x) for x in i2c.scan()])
['0x32']
>>> import rx8035
>>> rtc = rx8035.RX8035(i2c)
RTC status error. PON: True, XSTP: True, VDET: True # RTC status is checked at initialization stage.
>>> rtc.digital_offset(-2) # Digital offset may be adjusted.
>>> rtc.write_now() # Set rtc.
>>> rtc.datetime() # Read rtc.
(24, 10, 8, 1, 7, 46, 21) # (year, month, date, weekday, hours, minutes, seconds)
>>>
```