0

RTC not declared in this scope
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

RTC not declared in this scope

by Uvah on Mon Feb 19, 2018 5:23 pm

Hi, I'm new to Arduino and my first project is the 7 segment 8 digit binary clock using the max7219 and the DS1307RTC module. When I verify the sketch it comes back saying rtc not declared in this scope. It does show up at the top of the sketch, #DS1307_I2C_Address 0x68 in black text. Everything else needed...wire.h, DS1307.h and LedControl.h, are all there in red text. Now looking at the code, I'm using the clock made by LagSilva over at project hub. IO downloaded his code and pasted it into the IDE. He did the same and it worked. Why it doesn't work on mine is a mystery. I spent the better part of four days straight looking in Google and also Bing with less than satisfactory results. Even going through the forums at Arduino was inconclusive. Any assistance will be greatly appreciated. Thanks in advance.

Uvah
 
Posts: 1
Joined: Mon Feb 19, 2018 4:50 pm

Re: RTC not declared in this scope

by adafruit_support_carter on Mon Feb 19, 2018 7:33 pm

You probably need to install the RTC library.
How to install:
https://learn.adafruit.com/adafruit-all ... nstall-use
and this is (probably) the library:
https://www.arduino.cc/en/Reference/RTC
but based on the other headers you mention:
DS1307.h and LedControl.h

you may need to also install other libraries.

adafruit_support_carter
 
Posts: 6635
Joined: Tue Nov 29, 2016 2:45 pm

Please be positive and constructive with your questions and comments.