user63874: I am building a arduino based bicycle speedometer with time and temperature display.
Im currently stuck with the DS3231 (zs-042) chip. I found online a lot of library issues, i tried using
multiple libraries (Rinky-Dink, ds3231-master) but nothing works. I found a simple code online to test the chip but when I upload it the following error shows up: "no matching function for call to 'DS3231::DS3231(const uint8_t&, const uint8_t&)"
#include <Wire.h>
#include <DS3231.h>
DS3231  rtc(SDA, SCL);

void setup()
{
  Serial.begin(115200);
  
  // Initialize the rtc object
  rtc.begin();
  rtc.setDOW(WEDNESDAY);     // Set Day-of-Week to SUNDAY
  rtc.setTime(12, 0, 0);     // Set the time to 12:00:00 (24hr format)
  rtc.setDate(1, 1, 2014);   // Set the date to January 1st, 2014
}

void loop()
{
  // Send Day-of-Week
  Serial.print(rtc.getDOWStr());
  Serial.print(" ");
  
  // Send date
  Serial.print(rtc.getDateStr());
  Serial.print(" -- ");

  // Send time
  Serial.println(rtc.getTimeStr());
  
  // Wait one second before repeating :)
  delay (1000);
}


The error occurs in the third line (rtc (SDA,SCL)) - I have checked the pins and switched the battery on the chip. I also tried using A4 and A5 instead of SDA and SCL pins...
Any type of help would be awesome.
Best regards,
Marin

user63874: Alright I found the problem.
https://www.youtube.com/watch?v=BM3A7w3bhqM&ab_channel=MERTKILIC
In this video at 5:00 you can see the following:
First you have to download the library, unzip it and copy the files inside.
You will have to paste it to your Arduino/Libraries/DS3231 folder.

On the left is the current DS3231 Library which I added through the arduino library manager. Its not the same as the one the right, it should be, but its not, copy the files from the unzipped DS32321 library into the Arduino/library/DS3231.
Works fine now !

63874: <p>I am building a arduino based bicycle speedometer with time and temperature display.</p>
<p>Im currently stuck with the DS3231 (zs-042) chip. I found online a lot of library issues, i tried using
multiple libraries (Rinky-Dink, ds3231-master) but nothing works. I found a simple code online to test the chip but when I upload it the following error shows up: &quot;no matching function for call to 'DS3231::DS3231(const uint8_t&amp;, const uint8_t&amp;)&quot;</p>
<pre><code>#include &lt;Wire.h&gt;
#include &lt;DS3231.h&gt;
DS3231  rtc(SDA, SCL);

void setup()
{
  Serial.begin(115200);
  
  // Initialize the rtc object
  rtc.begin();
  rtc.setDOW(WEDNESDAY);     // Set Day-of-Week to SUNDAY
  rtc.setTime(12, 0, 0);     // Set the time to 12:00:00 (24hr format)
  rtc.setDate(1, 1, 2014);   // Set the date to January 1st, 2014
}

void loop()
{
  // Send Day-of-Week
  Serial.print(rtc.getDOWStr());
  Serial.print(&quot; &quot;);
  
  // Send date
  Serial.print(rtc.getDateStr());
  Serial.print(&quot; -- &quot;);

  // Send time
  Serial.println(rtc.getTimeStr());
  
  // Wait one second before repeating :)
  delay (1000);
}

</code></pre>
<p>The error occurs in the third line (rtc (SDA,SCL)) - I have checked the pins and switched the battery on the chip. I also tried using A4 and A5 instead of SDA and SCL pins...</p>
<p>Any type of help would be awesome.</p>
<p>Best regards,
Marin</p>
 63874: <p>Alright I found the problem.</p>
<p><a href="https://www.youtube.com/watch?v=BM3A7w3bhqM&amp;ab_channel=MERTKILIC" rel="nofollow noreferrer">https://www.youtube.com/watch?v=BM3A7w3bhqM&amp;ab_channel=MERTKILIC</a></p>
<p>In this video at 5:00 you can see the following:</p>
<p>First you have to download the library, unzip it and copy the files inside.</p>
<p>You will have to paste it to your Arduino/Libraries/DS3231 folder.</p>
<p><a href="https://i.stack.imgur.com/3uBms.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3uBms.jpg" alt="" /></a></p>
<p>On the left is the current DS3231 Library which I added through the arduino library manager. Its not the same as the one the right, it should be, but its not, copy the files from the unzipped DS32321 library into the Arduino/library/DS3231.</p>
<p>Works fine now !</p>
