Skip to main content

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​
TypeNameDescription
System.DateTimeOffsettimeThe System.DateTimeOffset to set.

SetAlarm(DateTimeOffset)​

Sets the alarm time

View Source​
Declaration
public void SetAlarm(DateTimeOffset alarmTime)
Parameters​
TypeNameDescription
System.DateTimeOffsetalarmTimeThe 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​
TypeNameDescription
System.BytetimerValueCount down timer value as an integer
Meadow.Foundation.RTCs.Ab0805.DelayTimeUnitunitCount 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.II2cPeripheral
  • Meadow.Hardware.IRealTimeClock