Class Ab0805
Represents a Ab0805 real-time clock
Assembly: Ab0805.dll
View Source
Declaration
public class Ab0805 : II2cPeripheral, IRealTimeClock
Implements:
Meadow.Hardware.II2cPeripheral, Meadow.Hardware.IRealTimeClock
Properties
DefaultI2cAddress
The default I2C address for the peripheral
View Source
Declaration
public byte DefaultI2cAddress { get; }
IsRunning
Gets or sets whether the RTC is running
View Source
Declaration
public bool IsRunning { get; set; }
HasTimerEnded
Has the timer ended
View Source
Declaration
public bool HasTimerEnded { get; }
HasAlarmTriggered
Has the alarm triggered
View Source
Declaration
public bool HasAlarmTriggered { get; }
Methods
GetTime()
Gets the current time from the RTC.
View Source
Declaration
public DateTimeOffset GetTime()
Returns
System.DateTimeOffset: A System.DateTimeOffset object representing the current time.
SetTime(DateTimeOffset)
Sets the time on the RTC.
View Source
Declaration
public void SetTime(DateTimeOffset time)
Parameters
| Type | Name | Description |
|---|---|---|
System.DateTimeOffset | time | The System.DateTimeOffset to set. |
SetAlarm(DateTimeOffset)
Sets the alarm time
View Source
Declaration
public void SetAlarm(DateTimeOffset alarmTime)
Parameters
| Type | Name | Description |
|---|---|---|
System.DateTimeOffset | alarmTime | The DateTimeOffset to trigger the alarm |
StartTimer(byte, DelayTimeUnit)
Start the timer on the RTC
View Source
Declaration
public void StartTimer(byte timerValue, Ab0805.DelayTimeUnit unit = DelayTimeUnit.Seconds)
Parameters
| Type | Name | Description |
|---|---|---|
System.Byte | timerValue | Count down timer value as an integer |
| Meadow.Foundation.RTCs.Ab0805.DelayTimeUnit | unit | Count down seconds or minutes |
ResetTimer()
Reset the timer on the RTC.
View Source
Declaration
public void ResetTimer()
ResetAlarm()
Reset the alarm on the RTC.
View Source
Declaration
public void ResetAlarm()
Implements
Meadow.Hardware.II2cPeripheralMeadow.Hardware.IRealTimeClock