RTC not declared in this scope

For RTC breakouts, etc., use the Other Products from Adafruit forum

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
Uvah
 
Posts: 1
Joined: Mon Feb 19, 2018 4:50 pm

RTC not declared in this scope

Post by Uvah »

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.

User avatar
adafruit_support_carter
 
Posts: 29168
Joined: Tue Nov 29, 2016 2:45 pm

Re: RTC not declared in this scope

Post by adafruit_support_carter »

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.

Locked
Please be positive and constructive with your questions and comments.

Return to “Clock Kits (discontinued)”