Hola,
He bajado la librería Time, la descomprimido y copiado en /home/carles/ARDUINO/arduino-1.0/libraries.
A continuación reinicio el IDE de Arduino y voy a "File, Examples, Time, Time, Examples,TimeSerial" y cargo el script, lo compilo y da los errores siguientes:
TimeSerial.cpp:12:20: error: Time.h: El fichero o carpeta no existe
TimeSerial.cpp:24: erreur: ‘time_t’ does not name a type
TimeSerial.cpp: In function ‘void setup()’:
TimeSerial.cpp:27: erreur: ‘requestSync’ was not declared in this scope
TimeSerial.cpp:27: erreur: ‘setSyncProvider’ was not declared in this scope
TimeSerial.cpp: In function ‘void loop()’:
TimeSerial.cpp:36: erreur: ‘timeStatus’ was not declared in this scope
TimeSerial.cpp:36: erreur: ‘timeNotSet’ was not declared in this scope
TimeSerial.cpp:38: erreur: ‘timeSet’ was not declared in this scope
TimeSerial.cpp: In function ‘void digitalClockDisplay()’:
TimeSerial.cpp:46: erreur: ‘hour’ was not declared in this scope
TimeSerial.cpp:47: erreur: ‘minute’ was not declared in this scope
TimeSerial.cpp:48: erreur: ‘second’ was not declared in this scope
TimeSerial.cpp:50: erreur: ‘day’ was not declared in this scope
TimeSerial.cpp:52: erreur: ‘month’ was not declared in this scope
TimeSerial.cpp:54: erreur: ‘year’ was not declared in this scope
TimeSerial.cpp: In function ‘void processSyncMessage()’:
TimeSerial.cpp:72: erreur: ‘time_t’ was not declared in this scope
TimeSerial.cpp:72: erreur: expected `;' before ‘pctime’
TimeSerial.cpp:76: erreur: ‘pctime’ was not declared in this scope
TimeSerial.cpp:79: erreur: ‘pctime’ was not declared in this scope
TimeSerial.cpp:79: erreur: ‘setTime’ was not declared in this scope
TimeSerial.cpp: At global scope:
TimeSerial.cpp:84: erreur: ‘time_t’ does not name a type
Esta claro que no lee la librería Time, pero he seguido las instrucciones de la pagina oficial de time, pues en la sección "Using the Library" dice:
"Copy the download to the Library directory. The Time directory contains the Time library and some example sketches illustrating how the library can be used with various time sources: "
¿Alguien ha conseguido que TimeSerial se ejecute sin errores y lea Time ? ![]()
Gracias.