996Views3Replies

Author Options:

no matching function for call to 'DS3231::DS3231(const uint8_t&, const uint8_t&)'? Answered

How can i rectify this error please?




#include <DS3231.h>

DS3231  rtc(SDA, SCL);




void setup()



  rtc.begin();

   rtc.setDOW(WEDNESDAY);    

  rtc.setTime(12, 00, 00);    

  rtc.setDate(1, 16, 2018);  

}




void loop()

{

}

Tags:rtc

Discussions

Wrong argument to DS3231.

Look at the code exsamples for the library

THE FOLLOWING IS THE CODE IM SETTING THE RTC MODULE UP WITH, BUT HAVE DOWNLOADED ALL THE LIBRARIES BUT STILL GETTING THE WORRIES..ANY OTHER APPROACH?


#include "DS3231.h"

DS3231 rtc (SDA, SCL);

void setup()

{

rtc.begin();

rtc.setDOW(WEDNESDAY);

rtc.setTime(12, 00, 00);

rtc.setDate(1, 16, 2018);

}

void loop()

{

}

Turning off caps lock would help.

Exactly WHERE did the library come from ?

Arduino gives example code for all the libraries you download. Check them out.

I don't know where you get the syntax

DS3231 rtc (SDA, SCL);

My copy of the DS3231 library says you need only DS3231 rtc; //no arguments. BUT you need the Wires library.