Go Down

Topic: Compile Problems with Time Library in Arduino 1.0.1 (Read 574 times) previous topic - next topic


Compiling the TimeAlarm example sketch  using Arduino 1.0.1 produces the following error:

C:\Program Files\Arduino\arduino-1.0.1-windows\arduino-1.0.1\libraries\TimeAlarms\TimeAlarms:cpp  In member function
' void TimeAlarmsClass::delay(long unsigned ind) ' :
C:\Program Files\Arduino\arduino-1.0.1-windows\arduino-1.0.1\libraries\TimeAlarms\TimeAlarms:cpp : 256 : error : 'millis' was not
declared in this scope.

Several others seemed to have similar problems getting this library to run. 

One fix I found is to change the include statement
at the top of the TimeAlarms.cpp file.
Change #include <Wprogram.h>"  to  #include<Arduino.h>

For other new comers to Arduino like myself, it is also helpful to know that Arduino.h file is not in the
libraries folder but instead is included in the core folder and nothing additional is needed
once the change is made to TimeAlarms.cpp.

Go Up