Having trouble using the DS3231.h library

Maybe you can try :

DS3231  rtc(A4, A5);

Or,

DS3231  rtc(27, 28);

See if it can help.