"In file included from TESTE_AJAX_COMPLETO_2.ino:8:
D:\Transferências\arduino-1.0.3\libraries\RTCdue/RTCdue.h:49: error: 'PIN_WIRE_SDA' was not declared in this scope
D:\Transferências\arduino-1.0.3\libraries\RTCdue/RTCdue.h:49: error: 'PIN_WIRE_SCL' was not declared in this scope
I've run the library examples and i get the same error.
I can't find anything related to this.
Thanks in advance!
I was trying to use this library because i've read that wire.h lib may cause some troubles with sd card, and this rtcdue says that it doesn't need wire library.
DS1307 library for DUE that doesn't need wire.h. Should work on others as well, just make sure you initialize with sda and scl pins if you cannot get it to work..
The error messages indicate that you did not do this.
That tells me when you initialize the class instead of leaving the parentheses empty (or at the values in the examples), provide two pin numbers for the sda and scl pins. So, on the UNO you would probably want
I also forgot to mention... For best practices, you should probably should have installed the RTCdue library into your \libraries folder instead of in the IDE libraries folder (and your sketches folder shouldn't be in the IDE folder tree). That way when you upgrade your IDE you don't have the accidental possibility of loosing access to the library.
Thank you very much, i've already done what PaulS mention and changed it on header of RTCdue.h file.
Good to know that it can be made that way which is good to change pins whenever we want.
Somethimes i asked myself "I have to change everything everytime that i update arduino IDE?"
of couse after your post i got my answer!
Many thanks to you all, you were very helpful!
Sembazuru I've tested this: RTC_DS1307 rtc (A4, A5); //A4 = SDA --- A5 = SCL
but it keeps giving me the same error: error: 'PIN_WIRE_SDA' was not declared in this scope
error: 'PIN_WIRE_SCL' was not declared in this scope
You have a space between "rtc" and "("... I'm not sure if this is allowed. (Not the way I normally write, but that might just be a style issue, not a syntax issue.)
Hi I am wondering if you ever find a solution to your problem.
I seems to be having similar issues.
I am using Arduino Due and using DS1307 kit from Adafruit.com
I hook it up per instruction but I use the DS1307 example I got from RTCdue.h github.
When I read the serial monitor, I got
RTC is NOT running!
85.85.2085 85:85:85
since midnight 1/1/1970 = 4162890385s = 48181d
now + 7d + 30s: 26.10.2101 14:26:55
pretty much the date and time are wrong.
I did try this DS1307 kit on an Uno using RTClib.h and it works fine there.
I also use logic level shifter from Sparkfun to convert the 5V I2C signals into 3.3V I2C signals.
Any clue on what is wrong and what I should be looking at?
I also tried changing the code to have
RTC_DS1397 rtc(20,21); and it compiles and loads fine but the time and date are still wrong.
Could the SCL and SDA pin be bad on my board yet the board can still have power and loaded and do serial monitoring?
I measured the voltages on those 2 pins without anything connected to them and read 3.3V. Is this okay?
I want to let you know that I have fixed my own problem.
The logic level shifter I was using was only bidirectional in one of the pin so I have to use another pin that is bidirectional for both SCL and SDA.
After I change my wiring, the RTCdue properly report the time that I expected.
The loigc level shifter was from Sparkfun and it has 2 channels. There are TX and RX in each channel. Only the TX pin is bidirectional. The RX is not.