Ds3231 Class

Definition

Realtime Clock DS3231

public class Ds3231 : Iot.Device.Rtc.RtcBase
type Ds3231 = class
    inherit RtcBase
Public Class Ds3231
Inherits RtcBase
Inheritance
Ds3231

Constructors

Ds3231(I2cDevice)

Creates a new instance of the DS3231

Fields

DefaultI2cAddress

DS3231 Default I2C Address

Properties

DateTime

Set or retrieves the current date/time. This property returns a DateTimeOffset and is therefore correct regardless of the current time zone (when LocalTimeZone is set correctly).

(Inherited from RtcBase)
EnabledAlarm

Gets or sets which of the two alarms is enabled

LocalTimeZone

Gets or sets the time zone this instance will operate in. Defaults to the local time zone from the system. Changing this property will not change the time on the real time clock, but instead affect the return value of DateTime

(Inherited from RtcBase)
RtcDateTime

The Device's raw DateTime. The caller must be aware of the device's time zone. The behavior of the Kind property is implementation-dependent (typically it is ignored)

(Inherited from RtcBase)
Temperature

DS3231 Temperature

Methods

Dispose() (Inherited from RtcBase)
Dispose(Boolean)

Cleanup

ReadAlarmOne()

Reads the currently set alarm 1

ReadAlarmTwo()

Reads the currently set alarm 2

ReadEnabledAlarm()

Reads which alarm is enabled

ReadTemperature()

Read DS3231 Temperature

ReadTime()

Read Time from DS3231

ResetAlarmTriggeredStates()

Resets the triggered state of both alarms. This must be called after every alarm trigger otherwise the alarm cannot trigger again

SetAlarmOne(Ds3231AlarmOne)

Sets alarm 1

SetAlarmTwo(Ds3231AlarmTwo)

Sets alarm 2

SetEnabledAlarm(Ds3231Alarm)

Sets which alarm is enabled

SetTime(DateTime)

Set DS3231 Time

Applies to