|Github Repo||C Header||C source||JS source|
Tested and works on esp8266/esp32
DS3231 is a low-cost, extremely accurate I2C real-time clock (RTC), with an integrated temperature-compensated crystal oscillator (TCXO) and crystal. The device incorporates a battery input, disconnect the main power supply and maintains accurate timekeeping. Integrated oscillator improve long-term accuracy of the device and reduces the number of components of the production line. RTC maintains seconds, minutes, hours, day, date, month, and year information. Less than 31 days of the month, the end date will be automatically adjusted, including corrections for leap year. The clock operates in either the 24 hours or band / AM / PM indication of the 12-hour format. Provides two configurable alarm clock and a calendar can be set to a square wave output. Address and data are transferred serially through an I2C bidirectional bus.See product page link for more information about the hardware.
config_schema: - ["i2c.enable", true] libs: - origin: https://github.com/mongoose-os-libs/arduino-ds3231
Create an instance of DS3231 with the methods described below.
myds instance; it's illegal to call any methods on that instance
Return value: none.
Set seconds, 0 to 59. Return value: none.
Set minutes, 0 to 59. Return value: none.
Set hours, 0 to 23. Return value: none.
Set day of the week, 1 to 7. Return value: none.
Set day of month, 1 to 31. Return value: none.
Set month, 1 to 12 Return value: none.
Set two last digits of the year, 0 to 99. Return value: none.
Get seconds, 0 to 59.
Get minutes, 0 to 59.
Get hours, 0 to 23.
Return 1 if 12-hour format is used, 0 otherwise.
Return 1 if it's later than the noon.
Get day of week, 1 to 7.
Get day of month, 1 to 31.
Get month, 1 to 12.
Get last two digits of the year, 0 to 99.
Return 1 if year is between 2100 and 2199; 0 otherwise.edit this doc