Hello, I am trying to port the time library from Arduino so that I can use the Spark core to power a new PlotClock I just printed and assembled(http://www.thingiverse.com/thing:248009). I have most of the code put together, but I am new to programming Arduino’s, so I am unsure how to proceed due to the error. The code uses both server.h and time.h, but time.h is not a library I can import. Here is the error I am seeing (from time.h):
Time.cpp:50:34: error: 'tmElements_t' has not been declared
Time.cpp:51:17: error: 'tmElements_t' was not declared in this scope
Time.cpp:51:31: error: 'tm' was not declared in this scope
Time.cpp:56:1: error: 'timeStatus_t' does not name a type
Time.cpp:57:23: error: variable or field 'setSyncProvider' declared void
Time.cpp:57:23: error: 'getExternalTime' was not declared in this scope
In file included from Time.cpp:39:0:
Time.h:139:33: error: 'time_t makeTime(tmElements_t&)' redeclared as different kind of symbol
Time.cpp:51:8: error: previous declaration of 'time_t makeTime'
Time.cpp: In function 'time_t makeTime(tmElements_t&)':
Time.cpp:207:33: error: 'time_t makeTime(tmElements_t&)' redeclared as different kind of symbol
Time.cpp:51:8: error: previous declaration of 'time_t makeTime'
Time.cpp: In function 'void setTime(int, int, int, int, int, int)':
Time.cpp:300:22: error: 'makeTime' cannot be used as a function
make: *** [Time.o] Error 1
I was hoping I might be able to pick the collective mind of Spark users to figure out a solution to this problem.