I downloaded the new 1.6.10 IDE and since then have huge problems compiling sketches using then time library. For example, using the (Adafruit) DS3231 library and sketch TimeRTC I get the error (condensed):
In file included from /Users/kurtbierbaum/Documents/Arduino/libraries/DS3232RTC/examples/TimeRTC/TimeRTC.ino:8:0:
/Users/kurtbierbaum/Documents/Arduino/libraries/DS3232RTC/DS3232RTC.h:136:26: error: 'tmElements_t' has not been declared
static byte read(tmElements_t &tm);
^
/Users/kurtbierbaum/Documents/Arduino/libraries/DS3232RTC/DS3232RTC.h:137:20: error: 'tmElements_t' has not been declared
byte write(tmElements_t &tm);
^
/Users/kurtbierbaum/Documents/Arduino/libraries/DS3232RTC/examples/TimeRTC/TimeRTC.ino: In function 'void setup()':
TimeRTC:15: error: 'setSyncProvider' was not declared in this scope
setSyncProvider(RTC.get); // the function to get the time from the RTC
This also affects a big sketch that I compiled a few hundred times with IDE 1.6.9. Even going back from 1.6.10 to 1.6.9 did not remove the compile error.
I also got a strange error that a "spurious .githib folder" was found in the library folder. Removing it in the terminal did remove the associated error, but not the compile error described above.
I'm having the same problem right now. I managed to get the one up and running again by uninstall and reinstall. But the other PC is not taking it. I'll try the work around and let you know.
Okay so I cant find those folders you mentioned, and mine is just stopping dead in its tracks and its really aggravating. Is there a board component that got updated in the 1.6.10 like the AVR that I can revert back to the old?
topdancer:
I also got a strange error that a "spurious .githib folder" was found in the library folder.
That's actually a warning, not an error and can be safely ignored. Was it actually spelled ".githib" or was that a typo and you meant ".github". If it was .githib then that warning is expected. If it was .github then that is incorrect behavior on 1.6.10 because they were supposed to have whitelisted that folder name. I tried .github with 1.6.10 and didn't get any warning.
epillar86:
Okay so I cant find those folders you mentioned,
Arduino15 folder locations:
You can find it by checking File > Preferences > More preferences can be edited directly in the file
On Mac OS X:
/Users/(username)/Library/Arduino15
On Windows:
Arduino IDE 1.6.5r5 and previous:
C:\Users(username)\AppData\Roaming\Arduino15
Arduino IDE 1.6.6 and later:
C:\Users(username)\AppData\Local\Arduino15
On Linux:
/home/(username)/.arduino15 (a.k.a. ~/.arduino15)
epillar86:
and mine is just stopping dead in its tracks and its really aggravating.
Please post the full error output using code tags(</> button on the toolbar).
epillar86:
Is there a board component that got updated in the 1.6.10 like the AVR that I can revert back to the old?
Yes, Arduino AVR Boards v1.6.12 is included with Arduino IDE 1.6.10. The problem might be caused by an older version installed at Arduino15/packages/arduino/hardware/avr, which would explain why topdance was able to fix it by deleting that folder, but the IDE is supposed to warn you about this when you first start 1.6.10 and remove the previous version.
The culprit is AVR core 1.6.12, or more specifically avr-libc 2.0.0, which now has <time.h> that gets picked up instead of <Time.h> on case-insensitive filesystems which are typical on Mac and Windows.
The fix is simple: change
#include <Time.h>
to #include <TimeLib.h>.
<time.h> was actually added in avr-libc 1.8.1, but earlier AVR cores used 1.8.0.
Non-AVR targets have already had it earlier.
topdancer:
@ pert:
I apologize for the typos in my post. I can confirm that the warning concerned a "spurious .github folder".
Do you remember which library caused that warning? Are you sure you got that error on Arduino IDE 1.6.10 and not Arduino IDE 1.6.9? If so I'll look into it and notify the developers if the IDE isn't correctly handling those folders. Also, which operating system are you using, that could be related.
Compiling the sketch with „Time.h“ & „DS3231RTC.h“ under IDE 1.6.9 works fine. If compiled under 1.6.10 the IDE throws the error which can be resolved by changing „Time.h“ —> „TimeLib.h“.
The original library was missing the Read example (Set was there) - the new library includes both examples.
Changing Time.h in the problem DS1307RTC to TimeLib.h worked OK.
The new download above seems to be OK and uses TimeLib.h from the start.
Taken a lot of time to sort this, but thanks to this thread, all is at peace, for now.
I have to say, that the number of RTC libraries can muddy the waters and I have to agree with comments elsewhere, that with a relatively simple device like the DS1307, it might be better not to use the libraries (other than Wire) and do your own thing, plus learn something into the bargin.
I shall be having a look at http://bildr.org/2011/03/ds1307-arduino/ - thank you Mr Pyner.
All I was originally trying to do was to reset the minutes and seconds to zero upon receiving a time signal at 00:00 from a radio controlled clock - the long term aim was to synchronise all the DS1307 and DS3232 systems at least once a day to maintain "accuracy" - the Maxim claim for the 3232 as "extremely accurate" was a bit wide of the mark as far as I'm concerned.