RTClib error help me!

I'm trying to use DS1307 RTC module with attiny85.
I isntalled TinyWireM library and RTClib library.

when I use #include <TinyWireM.h> only, there was't any error (on the other sketch file)

what should I do..?

--this is my code

#include <RTClib.h>
#include <TinyWireM.h>         // I2C통신 라이브러리         
        
RTC_DS1307 RTC;                // RTC 클래스 생성

void setup () {
  Serial.begin(9600);
  TinyWireM.begin();
  RTC.begin();
  RTC.adjust(DateTime(__DATE__, __TIME__));       // 연결된 PC의 현재 시간을 RTC모듈 기억소자에 동기화
}
 
void loop () {
  
  DateTime now = RTC.now();                       // 시간을 읽어옴
 
  Serial.print(now.year(), DEC);                  // 시리얼모니터에 출력
  Serial.print('/');
  Serial.print(now.month(), DEC);
  Serial.print('/');
  Serial.print(now.day(), DEC);
  Serial.print(' ');
  Serial.print(now.hour(), DEC);
  Serial.print(':');
  Serial.print(now.minute(), DEC);
  Serial.print(':');
  Serial.print(now.second(), DEC);
  Serial.println();
 
  delay(1000);
  
}

--thisis the error

In file included from C:\Users\User\Documents\Arduino\libraries\RTClib-master\src/RTClib.h:26:0,
                 from C:\Users\User\Desktop\식물 키우기\code\code.ino:1:
C:\Users\User\Documents\Arduino\libraries\Adafruit_BusIO-master/Adafruit_I2CDevice.h:10:36: error: 'TwoWire' has not been declared
   Adafruit_I2CDevice(uint8_t addr, TwoWire *theWire = &Wire);
                                    ^
C:\Users\User\Documents\Arduino\libraries\Adafruit_BusIO-master/Adafruit_I2CDevice.h:30:3: error: 'TwoWire' does not name a type
   TwoWire *_wire;
   ^
C:\Users\User\Documents\Arduino\libraries\Adafruit_BusIO-master/Adafruit_I2CDevice.h:10:56: error: could not convert '& Wire' from 'USI_TWI*' to 'int*'
   Adafruit_I2CDevice(uint8_t addr, TwoWire *theWire = &Wire);
                                                        ^
C:\Users\User\Documents\Arduino\libraries\Adafruit_BusIO-master/Adafruit_I2CDevice.h:18:45: error: 'nullptr' was not declared in this scope
              const uint8_t *prefix_buffer = nullptr, size_t prefix_len = 0);
                                             ^
In file included from C:\Users\User\Desktop\식물 키우기\code\code.ino:1:0:
C:\Users\User\Documents\Arduino\libraries\RTClib-master\src/RTClib.h:151:18: error: '__FlashStringHelper' does not name a type
   DateTime(const __FlashStringHelper *date, const __FlashStringHelper *time);
                  ^
C:\Users\User\Documents\Arduino\libraries\RTClib-master\src/RTClib.h:151:39: error: ISO C++ forbids declaration of 'date' with no type [-fpermissive]
   DateTime(const __FlashStringHelper *date, const __FlashStringHelper *time);
                                       ^
C:\Users\User\Documents\Arduino\libraries\RTClib-master\src/RTClib.h:151:51: error: '__FlashStringHelper' does not name a type
   DateTime(const __FlashStringHelper *date, const __FlashStringHelper *time);
                                                   ^
C:\Users\User\Documents\Arduino\libraries\RTClib-master\src/RTClib.h:151:72: error: ISO C++ forbids declaration of 'time' with no type [-fpermissive]
   DateTime(const __FlashStringHelper *date, const __FlashStringHelper *time);
                                                                        ^
C:\Users\User\Documents\Arduino\libraries\RTClib-master\src/RTClib.h:354:14: error: 'TwoWire' has not been declared
   bool begin(TwoWire *wireInstance = &Wire);
              ^
C:\Users\User\Documents\Arduino\libraries\RTClib-master\src/RTClib.h:354:39: error: could not convert '& Wire' from 'USI_TWI*' to 'int*'
   bool begin(TwoWire *wireInstance = &Wire);
                                       ^
C:\Users\User\Documents\Arduino\libraries\RTClib-master\src/RTClib.h:373:14: error: 'TwoWire' has not been declared
   bool begin(TwoWire *wireInstance = &Wire);
              ^
C:\Users\User\Documents\Arduino\libraries\RTClib-master\src/RTClib.h:373:39: error: could not convert '& Wire' from 'USI_TWI*' to 'int*'
   bool begin(TwoWire *wireInstance = &Wire);
                                       ^
C:\Users\User\Documents\Arduino\libraries\RTClib-master\src/RTClib.h:405:14: error: 'TwoWire' has not been declared
   bool begin(TwoWire *wireInstance = &Wire);
              ^
C:\Users\User\Documents\Arduino\libraries\RTClib-master\src/RTClib.h:405:39: error: could not convert '& Wire' from 'USI_TWI*' to 'int*'
   bool begin(TwoWire *wireInstance = &Wire);
                                       ^
C:\Users\User\Documents\Arduino\libraries\RTClib-master\src/RTClib.h:432:14: error: 'TwoWire' has not been declared
   bool begin(TwoWire *wireInstance = &Wire);
              ^
C:\Users\User\Documents\Arduino\libraries\RTClib-master\src/RTClib.h:432:39: error: could not convert '& Wire' from 'USI_TWI*' to 'int*'
   bool begin(TwoWire *wireInstance = &Wire);
                                       ^
In file included from C:\Users\User\Desktop\식물 키우기\code\code.ino:2:0:
C:\Users\User\Documents\Arduino\libraries\TinyWireM-master/TinyWireM.h:59:7: error: redefinition of 'class USI_TWI'
 class USI_TWI {
       ^
In file included from C:\Users\User\Documents\Arduino\libraries\Adafruit_BusIO-master/Adafruit_I2CDevice.h:5:0,
                 from C:\Users\User\Documents\Arduino\libraries\RTClib-master\src/RTClib.h:26,
                 from C:\Users\User\Desktop\식물 키우기\code\code.ino:1:
C:\Users\User\Documents\ArduinoData\packages\digistump\hardware\avr\1.6.7\libraries\Wire/Wire.h:47:7: error: previous definition of 'class USI_TWI'
 class USI_TWI
       ^
C:\Users\User\Desktop\식물 키우기\code\code.ino: In function 'void setup()':
code:9:13: error: cannot convert 'USI_TWI*' to 'int*' for argument '1' to 'bool RTC_DS1307::begin(int*)'
exit status 1
cannot convert 'USI_TWI*' to 'int*' for argument '1' to 'bool RTC_DS1307::begin(int*)'


The Adafruit_BusIO library does not seem to support your board. Maybe Nano Every error: 'TWSR' was not declared in this scope - #15 by cattledog can be a solution. Or a completely different library for the DS1307' I'm not familiar with your board so can't advise on that.

thank you!! I'll try it

You may have better luck finding a library for a more modern RTC like the DS3231. A side benefit of the DS3231 (rf any modern RTC) is much better accuracy and no external crystal is needed.