Hello,
I'm new to Arduino and I used the forum before to got some great help and I'm turning to it again after doing strenuous searching on other forums and the internet.
My code below is just an empty skeleton which includes the Time.h and DS1307RTC.h files from their respective libraries; I get an error (also shown below) with regards to the Time.h file.
Now I am using a new Arduino IDE that is meant to be compatible for the Arduino-Edison breakout board, and I know this might the wrong place to ask but I have asked the Intel forums as well and I'm looking here since maybe there are others with more experience on the matter.
The error with regards to Time.h seem to be the result from the IDE thinking there are multiple declarations of functions; when from what I understand it's declarations of the specific function (hour() minute(), etc) then the same function being defined for another instance (hour(time_t t) [the hour at time specified]) ... or am I completely understanding this wrong?
Any insight or direction on how to fix the error that is shown below would be greatly appreciated
#include<Time.h>
#include<DS1307RTC.h>
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
In file included from C:\Arduino_Edison_IDE/hardware/tools/edison/sysroots/core2-32-poky-linux/usr/include/sys/types.h:132:0,
from C:\Arduino_Edison_IDE/hardware/tools/edison/sysroots/core2-32-poky-linux/usr/include/stdlib.h:314,
from C:\Arduino_Edison_IDE\hardware\arduino\edison\cores\arduino/WString.h:26,
from C:\Arduino_Edison_IDE\hardware\arduino\edison\cores\arduino/Print.h:26,
from C:\Arduino_Edison_IDE\hardware\arduino\edison\cores\arduino/Stream.h:26,
from C:\Arduino_Edison_IDE\hardware\arduino\edison\libraries\Wire/Wire.h:24,
from Impulse_Counter_Clock.ino:1:
C:\Arduino_Edison_IDE\hardware\arduino\edison\libraries\Time/time.h:83:22: error: declaration of C function 'int hour(time_t)' conflicts with
int hour(time_t t); // the hour for the given time
^
C:\Arduino_Edison_IDE\hardware\arduino\edison\libraries\Time/time.h:82:9: error: previous declaration 'int hour()' here
int hour(); // the hour now
^
C:\Arduino_Edison_IDE\hardware\arduino\edison\libraries\Time/time.h:85:30: error: declaration of C function 'int hourFormat12(time_t)' conflicts with
int hourFormat12(time_t t); // the hour for the given time in 12 hour format
^
C:\Arduino_Edison_IDE\hardware\arduino\edison\libraries\Time/time.h:84:9: error: previous declaration 'int hourFormat12()' here
int hourFormat12(); // the hour now in 12 hour format
^
C:\Arduino_Edison_IDE\hardware\arduino\edison\libraries\Time/time.h:87:22: error: declaration of C function 'uint8_t isAM(time_t)' conflicts with
uint8_t isAM(time_t t); // returns true the given time is AM
^
C:\Arduino_Edison_IDE\hardware\arduino\edison\libraries\Time/time.h:86:9: error: previous declaration 'uint8_t isAM()' here
uint8_t isAM(); // returns true if time now is AM
^
C:\Arduino_Edison_IDE\hardware\arduino\edison\libraries\Time/time.h:89:22: error: declaration of C function 'uint8_t isPM(time_t)' conflicts with
uint8_t isPM(time_t t); // returns true the given time is PM
^
C:\Arduino_Edison_IDE\hardware\arduino\edison\libraries\Time/time.h:88:9: error: previous declaration 'uint8_t isPM()' here
uint8_t isPM(); // returns true if time now is PM
^
C:\Arduino_Edison_IDE\hardware\arduino\edison\libraries\Time/time.h:91:24: error: declaration of C function 'int minute(time_t)' conflicts with
int minute(time_t t); // the minute for the given time
^
C:\Arduino_Edison_IDE\hardware\arduino\edison\libraries\Time/time.h:90:9: error: previous declaration 'int minute()' here
int minute(); // the minute now
^
C:\Arduino_Edison_IDE\hardware\arduino\edison\libraries\Time/time.h:93:24: error: declaration of C function 'int second(time_t)' conflicts with
int second(time_t t); // the second for the given time
^
C:\Arduino_Edison_IDE\hardware\arduino\edison\libraries\Time/time.h:92:9: error: previous declaration 'int second()' here
int second(); // the second now
^
C:\Arduino_Edison_IDE\hardware\arduino\edison\libraries\Time/time.h:95:21: error: declaration of C function 'int day(time_t)' conflicts with
int day(time_t t); // the day for the given time
^
C:\Arduino_Edison_IDE\hardware\arduino\edison\libraries\Time/time.h:94:9: error: previous declaration 'int day()' here
int day(); // the day now
^
C:\Arduino_Edison_IDE\hardware\arduino\edison\libraries\Time/time.h:97:25: error: declaration of C function 'int weekday(time_t)' conflicts with
int weekday(time_t t); // the weekday for the given time
^
C:\Arduino_Edison_IDE\hardware\arduino\edison\libraries\Time/time.h:96:9: error: previous declaration 'int weekday()' here
int weekday(); // the weekday now (Sunday is day 1)
^
C:\Arduino_Edison_IDE\hardware\arduino\edison\libraries\Time/time.h:99:23: error: declaration of C function 'int month(time_t)' conflicts with
int month(time_t t); // the month for the given time
^
C:\Arduino_Edison_IDE\hardware\arduino\edison\libraries\Time/time.h:98:9: error: previous declaration 'int month()' here
int month(); // the month now (Jan is month 1)
^
C:\Arduino_Edison_IDE\hardware\arduino\edison\libraries\Time/time.h:101:22: error: declaration of C function 'int year(time_t)' conflicts with
int year(time_t t); // the year for the given time
^
C:\Arduino_Edison_IDE\hardware\arduino\edison\libraries\Time/time.h:100:9: error: previous declaration 'int year()' here
int year(); // the full four digit year: (2009, 2010 etc)
^
C:\Arduino_Edison_IDE\hardware\arduino\edison\libraries\Time/time.h:105:66: error: declaration of C function 'void setTime(int, int, int, int, int, int)' conflicts with
void setTime(int hr,int min,int sec,int day, int month, int yr);
^
C:\Arduino_Edison_IDE\hardware\arduino\edison\libraries\Time/time.h:104:9: error: previous declaration 'void setTime(time_t)' here
void setTime(time_t t);