Hi, someone could tell me how to enable the RTC square wave output (SWQ), I have tried to do it using these commands (commented) but I got an error when compiling them
#include <RTClib.h>
#include <Wire.h>
RTC_DS3231 rtc;
char t[32];
void setup() {
Serial.begin(115200);
Wire.begin();
rtc.begin();
//rtc.writeSqwPinMode (DS3231_SquareWave1Hz); // ERROR SQW
//rtc.sqw(DS3231_SquareWave1Hz); // ERROR SQW
rtc.adjust(DateTime(2014, 1, 21, 3, 0, 0));
}
void loop(){
DateTime now = rtc.now();
sprintf(t, "%02d:%02d:%02d %02d/%02d/%02d", now.hour(), now.minute(), now.second(), now.day(), now.month(), now.year());
Serial.print(F("Date/Time: "));
Serial.println(t);
delay(1000);
}