Go Down

Topic: Unable to compile time.h library (Read 3028 times) previous topic - next topic

0coool

I am trying to automate an aquarium with a mega board and i ended up accumulating a ton of files in my library so I removed the arduino program using add/remove programs in win7. I then deleted the arduino folder in my documents. Upon reloading the program I can use the built in libraries like blink but anything I add like time.h does not compile. The errors look like this:
TimeRTC.pde: In function 'void setup()':
TimeRTC:13: error: 'RTC' was not declared in this scope
TimeRTC:13: error: 'setSyncProvider' was not declared in this scope
TimeRTC:14: error: 'timeStatus' was not declared in this scope
TimeRTC:14: error: 'timeSet' was not declared in this scope
TimeRTC.pde: In function 'void digitalClockDisplay()':
TimeRTC:28: error: 'hour' was not declared in this scope
TimeRTC:29: error: 'minute' was not declared in this scope

What am I doing wrong this used to work perfectly?

K5CZ

You must import time.h library. It then resides in the Documents\Arduino\libraries\Time folder.


0coool

Thats exactly how I added the library and it doesnt work. If the #include <Time.h>   does not appear with orange text does that mean anything? I'm adding the zip file via the add library function directly from my downloads folder. should I copy and past the data elsewhere? Any help is greatly appreciated.

0coool

Arduino: 1.5.4 (Windows 7), Board: "Arduino Mega 2560 or Mega ADK"

TimeRTC.pde: In function 'void setup()':
TimeRTC:13: error: 'RTC' was not declared in this scope
TimeRTC:13: error: 'setSyncProvider' was not declared in this scope
TimeRTC:14: error: 'timeStatus' was not declared in this scope
TimeRTC:14: error: 'timeSet' was not declared in this scope
TimeRTC.pde: In function 'void digitalClockDisplay()':
TimeRTC:28: error: 'hour' was not declared in this scope
TimeRTC:29: error: 'minute' was not declared in this scope
TimeRTC:30: error: 'second' was not declared in this scope
TimeRTC:32: error: 'day' was not declared in this scope
TimeRTC:34: error: 'month' was not declared in this scope
TimeRTC:36: error: 'year' was not declared in this scope

  This report would have more information with
  "Show verbose output during compilation"
  enabled in File > Preferences.

K5CZ

So, it is time to post your sketch. It is hard to advise when we do not know how it's written inside.

Go Up