Skip to content

Commit 54c1ae7

Browse files
authored
Read Me for SmallRTC Version 2.4.7.
1 parent fd9beb7 commit 54c1ae7

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SmallRTC 2.4.3 [![Arduino Lint](https://github.com/GuruSR/SmallRTC/actions/workflows/main.yml/badge.svg)](https://github.com/GuruSR/SmallRTC/actions/workflows/main.yml)
1+
# SmallRTC 2.4.7 [![Arduino Lint](https://github.com/GuruSR/SmallRTC/actions/workflows/main.yml/badge.svg)](https://github.com/GuruSR/SmallRTC/actions/workflows/main.yml)
22
A WatchyRTC replacement that offers more functionality, correct time.h and timelib.h operation and is NTP safe.
33

44
Function names changed in Version 2.3.5+, please be aware of them.
@@ -9,6 +9,8 @@ Functions and their usage:
99

1010
**init():** Use this in the **switch (wakeup_reason)** in **default:** Make it the first entry, so you can use the last function for Battery Voltage. Now includes corrections for the DS3231 and includes detection of non-functioning RTC.
1111

12+
**sysBoot():** (Version 2.4.7+) Add this to your boot sequence to correct isNewMinute during Active Mode.
13+
1214
**setDateTime(String datetime):** Originally from WatchyRTC.config(datetime), this is cleaned up and corrected, includes detection of non-functioning RTC.
1315

1416
**read(tmElements_t &tm):** Use this to read the RTC's current time state in a tmElements_t variable.
@@ -20,16 +22,16 @@ Functions and their usage:
2022
**nextMinuteWake(bool Enabled = true):** This should be in your `deepSleep()` function just in front of `esp_deep_sleep_start()`. This functions offers a False (optional) that will not wake the watch up on the next minute, for those who wish to only enable buttons to wake.
2123

2224
**atMinuteWake(uint8_t Minute, bool Enabled = true):**
23-
Use this instead of `nextMinuteWake`, as this will make the RTC wake up when the Minute data element matches the Minute you give it. Just like `nextMinuteWake` it can use False (optional) here to also stop the wake up from happening. atMinuteWake can accept up to 60 minutes of extra time on the Minute value, this allows for minute wraparound if you don't want to calculate it yourself.
25+
Use this instead of `nextMinuteWake`, as this will make the RTC wake up when the Minute data element matches the Minute you give it. Just like `nextMinuteWake` it can use False (optional) here to also stop the wake up from happening.
2426

2527
**atTimeWake(uint8_t Hour, uint8_t Minute, bool Enabled = true):**
26-
Use this function to request the RTC to wake up on the hour and minute. The Minute can accept up to 120 minutes, these are rolled into hours and added to the Hour entry. Any hour rollover is automatically accounted for.
28+
Use this function to request the RTC to wake up on the hour and minute, for Midnight the hour has to be set to **24**.
2729

2830
**uint8_t temperature():** Imported from WatchyRTC for compatibility.
2931

3032
**uint8_t getType():** Returns the rtcType as it is no longer exposed.
3133

32-
**uint32_t getADCPin():** Returns the ADC_PIN, to see an example, see NOTE below. [^1] [^2]
34+
**uint32_t getADCPin():** Returns the ADC_PIN, so your BatteryVoltage function can look like:
3335

3436
**uint16_t getLocalYearOffset():** Returns the Year Offset, hard coded to 1900.
3537

@@ -67,9 +69,9 @@ Use this function to request the RTC to wake up on the hour and minute. The Min
6769

6870
**void use32K(bool active):** Tell SmallRTC for the Internal RTC to use the 32K timing. Automatically on for Watchy V3.
6971

70-
[^2]: Usage of the getADCPin() function: `getBatteryVoltage() { return analogReadMilliVolts(RTC.getADCPin()) / 500.0f; }` 500.0f is a sample divider, please use the correct one for the supported version.
72+
**NOTE:** To use the getADCPin(): `getBatteryVoltage() { return analogReadMilliVolts(RTC.getADCPin()) / 500.0f; }`
7173

72-
[^1]: For the PCF8563, there are 2 variants, use the RTC.getADCPin() to determine where the UP Button is.
74+
**NOTE:** For the PCF8563, there are 2 variants, use the RTC.getADCPin() to determine where the UP Button is.
7375

7476
All `bool Internal` parameters are optional, though if you do not choose true, the useESP32 function's value is used.
7577

0 commit comments

Comments
 (0)