RTC using the internal micros() clock, has to be initialized before use. Unlike RTC_Millis, this can be tuned in order to compensate for the natural drift of the system clock. Note that now() has to be called more frequently than the micros() rollover period, which is approximately 71.6 minutes.
More...
#include <RTClib.h>
RTC using the internal micros() clock, has to be initialized before use. Unlike RTC_Millis, this can be tuned in order to compensate for the natural drift of the system clock. Note that now() has to be called more frequently than the micros() rollover period, which is approximately 71.6 minutes.
◆ begin()
void RTC_Micros::begin |
( |
const DateTime & |
dt | ) |
|
|
inline |
Start the RTC.
- Parameters
-
dt | DateTime object with the date/time to set |
◆ adjust()
void RTC_Micros::adjust |
( |
const DateTime & |
dt | ) |
|
Set the current date/time of the RTC_Micros clock.
- Parameters
-
dt | DateTime object with the desired date and time |
◆ adjustDrift()
void RTC_Micros::adjustDrift |
( |
int |
ppm | ) |
|
Adjust the RTC_Micros clock to compensate for system clock drift.
- Parameters
-
ppm | Adjustment to make. A positive adjustment makes the clock faster. |
◆ now()
Get the current date/time from the RTC_Micros clock.
- Returns
- DateTime object containing the current date/time
◆ microsPerSecond
uint32_t RTC_Micros::microsPerSecond = 1000000 |
|
protected |
Number of microseconds reported by micros()
per "true" (calibrated) second.
◆ lastUnix
uint32_t RTC_Micros::lastUnix |
|
protected |
Unix time from the previous call to now().
The timing logic is identical to RTC_Millis.
◆ lastMicros
uint32_t RTC_Micros::lastMicros |
|
protected |
micros()
value corresponding to lastUnix
.
The documentation for this class was generated from the following files: