Greetings!
The SD shield worked wonderfully with the sketch on the tutorial web page. However, it did not timestamp the files. After downloading the version that allows files to be timestamped:
http://forums.adafruit.com/viewtopic.php?f=31&t=24814
I keep getting these errors each time I try to compile the sketch:
In file included from lighttemplogger.cpp:236:
C:\Users\JL\Documents\Arduino-1.0.1\libraries\RTClib/RTClib.h:5: error: redefinition of 'class DateTime'
C:\Users\JL\Documents\Arduino-1.0.1\libraries\RTClib/RTClib.h:5: error: previous definition of 'class DateTime'
C:\Users\JL\Documents\Arduino-1.0.1\libraries\RTClib/RTClib.h:29: error: redefinition of 'class RTC_DS1307'
C:\Users\JL\Documents\Arduino-1.0.1\libraries\RTClib/RTClib.h:29: error: previous definition of 'class RTC_DS1307'
C:\Users\JL\Documents\Arduino-1.0.1\libraries\RTClib/RTClib.h:39: error: redefinition of 'class RTC_Millis'
C:\Users\JL\Documents\Arduino-1.0.1\libraries\RTClib/RTClib.h:39: error: previous definition of 'class RTC_Millis'
lighttemplogger.pde error: redefinition of 'uint32_t syncTime'
lighttemplogger.pde error: 'uint32_t syncTime' previously defined here
lighttemplogger.pde error: redefinition of 'RTC_DS1307 RTC'
lighttemplogger.pde error: 'RTC_DS1307 RTC' previously declared here
lighttemplogger.pde error: redefinition of 'const int chipSelect'
lighttemplogger.pde error: 'const int chipSelect' previously defined here
lighttemplogger.pde error: redefinition of 'File logfile'
lighttemplogger.pde error: 'File logfile' previously declared here
lighttemplogger.cpp: In function 'void error(char*)':
lighttemplogger.pde error: redefinition of 'void error(char*)'
lighttemplogger.pde error: 'void error(char*)' previously defined here
lighttemplogger.cpp: In function 'void setup()':
lighttemplogger.pde error: redefinition of 'void setup()'
lighttemplogger.pde error: 'void setup()' previously defined here
lighttemplogger.cpp: In function 'void loop()':
lighttemplogger.pde error: redefinition of 'void loop()'
lighttemplogger.pde error: 'void loop()' previously defined here
Doubtless I am doing something truly idiotic. The above errors hold true even if I revert to the original program, which compiled and uploaded just fine the first time.
Any help would be greatly appreciated!
Silly problem with SD shield revision
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_bill
- Posts: 88097
- Joined: Sat Feb 07, 2009 10:11 am
Re: Silly problem with SD shield revision
It looks like RTClib is getting included twice. Make sure you have only one copy of RTClib.h on your system.
- heliophagus
- Posts: 20
- Joined: Sun May 27, 2012 8:59 pm
Re: Silly problem with SD shield revision
The problem turned out to be my lack of familiarity with the Arduino environment (I'm more of a PIC and HiTech C guy). The IDE thought it was being helpful but ended up tripping over itself. Erasing the logger folder and re-downloading the file, this time sticking with Arduino naming conventions, fixed the problem.
The data logging shield's working like a champ, file date-stamps are now perfect, and the program is a great launching-point for developing other applications.
Yay Adafruit.
The data logging shield's working like a champ, file date-stamps are now perfect, and the program is a great launching-point for developing other applications.
Yay Adafruit.
Please be positive and constructive with your questions and comments.