Table of Contents

Irtc32kHz()

Irtc32kHz() enables or disables the RTC 32kHz output.

Irtc32kHz command operation flow

bool Irtc32kHz(bool enable = true)

Commands

Command Arguments Return Value Operation
Irtc32kHz(enable) bool enable = true bool Enables or disables the RTC 32kHz output.

Example

This example connects a DS3231 RTC module to the MPINO-16A8R8T I²C port. The RTC's 32 kHz and square-wave outputs use different pins.

void setup() {
  Serial.begin(115200);
  if (!IrtcBegin()) {  // Check the DS3231 connection and start the RTC.
    Serial.println(F("DS3231 not found"));
    return;
  }
  const bool configured = Irtc32kHz(true);  // Enable the RTC's 32 kHz output pin.
  Serial.println(configured ? F("Output enabled") : F("RTC setup failed"));
}
 
void loop() {}

Precautions

Run each device's corresponding Begin command first. Check I²C addresses and pin sharing; if the bool return value is false, inspect wiring and power.

Built-in Commands in the Same Category

← Built-in Command List