Go Down

Topic: RTC DS1337 error (Read 461 times) previous topic - next topic

srj0408

I am trying to use RTC DS1337 due to its alarm capabilities. I am not a expert in C++ programming but had worked a bit in C++. I am trying to use DS1337 library provided at this Arduino forum.
http://forum.arduino.cc/index.php?topic=38077.0.As per them, it work fine for them but for me, it didn't.
I am using Arduino 1.0.5-r2 and trying to use their library. It always shows a error which says that WProgram.h file not found. After a bit googling, i found that replacing WProgram.h by Arduino.h will work.I did the same but still i am getting error.

Code: [Select]
In file included from C:\Program Files\Arduino\hardware\arduino\cores\arduino/Print.h:26,
                 from C:\Program Files\Arduino\hardware\arduino\cores\arduino/Stream.h:26,
                 from C:\Program Files\Arduino\libraries\Wire/Wire.h:26,
                 from C:\Program Files\Arduino\libraries\DS1337\DS1337.cpp:7:
C:\Program Files\Arduino\hardware\arduino\cores\arduino/WString.h:116: error: declaration of C function 'StringSumHelper& operator+(const StringSumHelper&, const char*)' conflicts with
C:\Program Files\Arduino\hardware\arduino\cores\arduino/WString.h:115: error: previous declaration 'StringSumHelper& operator+(const StringSumHelper&, const String&)' here
C:\Program Files\Arduino\hardware\arduino\cores\arduino/WString.h:117: error: declaration of C function 'StringSumHelper& operator+(const StringSumHelper&, char)' conflicts with
C:\Program Files\Arduino\hardware\arduino\cores\arduino/WString.h:116: error: previous declaration 'StringSumHelper& operator+(const StringSumHelper&, const char*)' here
C:\Program Files\Arduino\hardware\arduino\cores\arduino/WString.h:118: error: declaration of C function 'StringSumHelper& operator+(const StringSumHelper&, unsigned char)' conflicts with
C:\Program Files\Arduino\hardware\arduino\cores\arduino/WString.h:117: error: previous declaration 'StringSumHelper& operator+(const StringSumHelper&, char)' here
C:\Program Files\Arduino\hardware\arduino\cores\arduino/WString.h:119: error: declaration of C function 'StringSumHelper& operator+(const StringSumHelper&, int)' conflicts with
C:\Program Files\Arduino\hardware\arduino\cores\arduino/WString.h:118: error: previous declaration 'StringSumHelper& operator+(const StringSumHelper&, unsigned char)' here
C:\Program Files\Arduino\hardware\arduino\cores\arduino/WString.h:120: error: declaration of C function 'StringSumHelper& operator+(const StringSumHelper&, unsigned int)' conflicts with
C:\Program Files\Arduino\hardware\arduino\cores\arduino/WString.h:119: error: previous declaration 'StringSumHelper& operator+(const StringSumHelper&, int)' here
C:\Program Files\Arduino\hardware\arduino\cores\arduino/WString.h:121: error: declaration of C function 'StringSumHelper& operator+(const StringSumHelper&, long int)' conflicts with
C:\Program Files\Arduino\hardware\arduino\cores\arduino/WString.h:120: error: previous declaration 'StringSumHelper& operator+(const StringSumHelper&, unsigned int)' here
C:\Program Files\Arduino\hardware\arduino\cores\arduino/WString.h:122: error: declaration of C function 'StringSumHelper& operator+(const StringSumHelper&, long unsigned int)' conflicts with
C:\Program Files\Arduino\hardware\arduino\cores\arduino/WString.h:121: error: previous declaration 'StringSumHelper& operator+(const StringSumHelper&, long int)' here
C:\Program Files\Arduino\libraries\DS1337\DS1337.cpp: In member function 'void DS1337::readTime()':
C:\Program Files\Arduino\libraries\DS1337\DS1337.cpp:38: error: 'class TwoWire' has no member named 'send'
C:\Program Files\Arduino\libraries\DS1337\DS1337.cpp:47: error: 'class TwoWire' has no member named 'receive'
C:\Program Files\Arduino\libraries\DS1337\DS1337.cpp: In member function 'void DS1337::readAlarm()':
C:\Program Files\Arduino\libraries\DS1337\DS1337.cpp:59: error: 'class TwoWire' has no member named 'send'
C:\Program Files\Arduino\libraries\DS1337\DS1337.cpp:69: error: 'class TwoWire' has no member named 'receive'
C:\Program Files\Arduino\libraries\DS1337\DS1337.cpp: In member function 'void DS1337::writeTime()':
C:\Program Files\Arduino\libraries\DS1337\DS1337.cpp:93: error: 'class TwoWire' has no member named 'send'
C:\Program Files\Arduino\libraries\DS1337\DS1337.cpp:96: error: 'class TwoWire' has no member named 'send'
C:\Program Files\Arduino\libraries\DS1337\DS1337.cpp: In member function 'void DS1337::writeAlarm()':
C:\Program Files\Arduino\libraries\DS1337\DS1337.cpp:120: error: 'class TwoWire' has no member named 'send'
C:\Program Files\Arduino\libraries\DS1337\DS1337.cpp:122: error: 'class TwoWire' has no member named 'send'
C:\Program Files\Arduino\libraries\DS1337\DS1337.cpp:123: error: 'class TwoWire' has no member named 'send'
C:\Program Files\Arduino\libraries\DS1337\DS1337.cpp:124: error: 'class TwoWire' has no member named 'send'
C:\Program Files\Arduino\libraries\DS1337\DS1337.cpp:130: error: 'class TwoWire' has no member named 'send'
C:\Program Files\Arduino\libraries\DS1337\DS1337.cpp:135: error: 'class TwoWire' has no member named 'send'
C:\Program Files\Arduino\libraries\DS1337\DS1337.cpp: In member function 'unsigned char DS1337::getRegister(unsigned char)':
C:\Program Files\Arduino\libraries\DS1337\DS1337.cpp:166: error: 'class TwoWire' has no member named 'send'
C:\Program Files\Arduino\libraries\DS1337\DS1337.cpp:171: error: 'class TwoWire' has no member named 'receive'
C:\Program Files\Arduino\libraries\DS1337\DS1337.cpp: In member function 'void DS1337::setRegister(unsigned char, unsigned char)':
C:\Program Files\Arduino\libraries\DS1337\DS1337.cpp:177: error: 'class TwoWire' has no member named 'send'
C:\Program Files\Arduino\libraries\DS1337\DS1337.cpp:179: error: 'class TwoWire' has no member named 'send'


I am unable to figure out what wrong i am doing.

PaulS

Quote
I am unable to figure out what wrong i am doing.

It's not necessarily you. There is no excuse for DS1337.cpp using the String class. I'd look for a better library.

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy