Binety Clock

I have a sketch for a Binary Clock which I have modified. The original sketch used the RTClib.h Library, for the DS1307 I have modified the sketch to use the DS1302RTC.h Library. When I compile the sketch I get the message "‘RTC_DS1302’ does not name a type. Here is the relevant piece of code:

#include <Wire.h>
#include <DS1302RTC.h>

RTC_DS1302 RTC; // this causes an error.
int datapin = 2; 
int clockpin = 3;
int latchpin = 4;
int datapin2 = 8; 
int clockpin2 = 9;
int latchpin2= 10;

void setup()
{
  Serial.begin(57600);
  Wire.begin();
  RTC.begin();

Can I just change the libraries and is this the correct way to cfreate an instancde?

Copy-paste the full error message. It's possible that it didn't find the library. That part of the error message will be further back in the error log.

I sorted the problem by buying a ds1307rtc. Problem solved :slight_smile: