This was supposed to be the code for automatic pet feeder Got it from here1
The problem is that I always got a "No matching function for call to'DS3231 (const uint8_t &, const uint8_t &)"
Here's the error code
Arduino: 1.8.19 (Windows 10), Board: "Arduino Uno"
ANA_FEEDER_PROJECT:53:18: error: no matching function for call to 'DS3231::DS3231(const uint8_t&, const uint8_t&)'
DS3231 rtc(A4, A5);
^
In file included from C:\Users\SERIES\Desktop\ANA_FEEDER_PROJECT\ANA_FEEDER_PROJECT.ino:1:0:
D:\Documents\Arduino\libraries\DS3231/DS3231.h:67:3: note: candidate: DS3231::DS3231(TwoWire&)
DS3231(TwoWire & w);
^~~~~~
D:\Documents\Arduino\libraries\DS3231/DS3231.h:67:3: note: candidate expects 1 argument, 2 provided
D:\Documents\Arduino\libraries\DS3231/DS3231.h:66:3: note: candidate: DS3231::DS3231()
DS3231();
^~~~~~
D:\Documents\Arduino\libraries\DS3231/DS3231.h:66:3: note: candidate expects 0 arguments, 2 provided
D:\Documents\Arduino\libraries\DS3231/DS3231.h:62:7: note: candidate: constexpr DS3231::DS3231(const DS3231&)
class DS3231 {
^~~~~~
D:\Documents\Arduino\libraries\DS3231/DS3231.h:62:7: note: candidate expects 1 argument, 2 provided
D:\Documents\Arduino\libraries\DS3231/DS3231.h:62:7: note: candidate: constexpr DS3231::DS3231(DS3231&&)
D:\Documents\Arduino\libraries\DS3231/DS3231.h:62:7: note: candidate expects 1 argument, 2 provided
C:\Users\SERIES\Desktop\ANA_FEEDER_PROJECT\ANA_FEEDER_PROJECT.ino: In function 'void setup()':
ANA_FEEDER_PROJECT:84:7: error: 'class DS3231' has no member named 'begin'
rtc.begin();
^~~~~
C:\Users\SERIES\Desktop\ANA_FEEDER_PROJECT\ANA_FEEDER_PROJECT.ino: In function 'void loop()':
ANA_FEEDER_PROJECT:130:10: error: 'class DS3231' has no member named 'getTimeStr'; did you mean 'getMinute'?
t = rtc.getTimeStr();
^~~~~~~~~~
getMinute
ANA_FEEDER_PROJECT:146:16: error: 'class DS3231' has no member named 'getTimeStr'; did you mean 'getMinute'?
lcd.print(rtc.getTimeStr());
^~~~~~~~~~
getMinute
ANA_FEEDER_PROJECT:152:16: error: 'class DS3231' has no member named 'getDateStr'; did you mean 'getDate'?
lcd.print(rtc.getDateStr());
^~~~~~~~~~
getDate
exit status 1
no matching function for call to 'DS3231::DS3231(const uint8_t&, const uint8_t&)'
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
The problem is that I always got a "No matching function for call to'DS3231 (const uint8_t &, const uint8_t &)"
Here's the error code