Короче говоря, я использую библиотеку RTCZero, чтобы через некоторое время создать будильник для моего arduino, но я убедился, что когда я добавляю больше датчиков с большим количеством библиотек, библиотека RT C не совместима с ними. Я думал, что это вызвано моим включением, но проблема все еще сохраняется. Любое решение?
!!! РЕДАКТИРОВАТЬ !!!
Точнее, я обнаружил, что проблемными c библиотеками являются только эти: Здесь вы можете скачать всю библиотеку (включая в этот скрипт в). https://github.com/charles-the-forth/openCanSat-library
#include <Adafruit_BME280.h>
#include <Adafruit_INA219.h>
#include "Open_Cansat_GPS.h"
#include "RFM69.h"
Здесь указаны
#include <Adafruit_BME280.h> // include Adafruit BME280 library
#include <Adafruit_INA219.h> // include INA219
#include <SD.h> // include Arduino SD library
#include "Open_Cansat_GPS.h"
//include our new sensors
#include <MICS6814.h>
#include <MICS-VZ-89TE.h>
#include "MQ131.h"
#include <Wire.h>
#include "RFM69.h" // include RFM69 library
#include <SPI.h>
#include <RTCZero.h>
Вот ошибки
Arduino: 1.8.10 (Windows 10), Vývojová deska: "Arduino M0"
C:\Users\Marty\Documents\Arduino\libraries\RTCZero-master\src\RTCZero.cpp: In member function 'uint32_t RTCZero::getEpoch()':
C:\Users\Marty\Documents\Arduino\libraries\RTCZero-master\src\RTCZero.cpp:379:13: error: aggregate 'RTCZero::getEpoch()::tm tm' has incomplete type and cannot be defined
struct tm tm;
^~
C:\Users\Marty\Documents\Arduino\libraries\RTCZero-master\src\RTCZero.cpp:391:10: error: 'mktime' was not declared in this scope
return mktime(&tm);
^~~~~~
C:\Users\Marty\Documents\Arduino\libraries\RTCZero-master\src\RTCZero.cpp:391:10: note: suggested alternative: 'mktemp'
return mktime(&tm);
^~~~~~
mktemp
C:\Users\Marty\Documents\Arduino\libraries\RTCZero-master\src\RTCZero.cpp: In member function 'void RTCZero::setAlarmEpoch(uint32_t)':
C:\Users\Marty\Documents\Arduino\libraries\RTCZero-master\src\RTCZero.cpp:407:22: error: 'gmtime' was not declared in this scope
struct tm* tmp = gmtime(&t);
^~~~~~
C:\Users\Marty\Documents\Arduino\libraries\RTCZero-master\src\RTCZero.cpp:407:22: note: suggested alternative: 'setTime'
struct tm* tmp = gmtime(&t);
^~~~~~
setTime
C:\Users\Marty\Documents\Arduino\libraries\RTCZero-master\src\RTCZero.cpp:409:21: error: invalid use of incomplete type 'struct RTCZero::setAlarmEpoch(uint32_t)::tm'
setAlarmDate(tmp->tm_mday, tmp->tm_mon + 1, tmp->tm_year - EPOCH_TIME_YEAR_OFF);
^~
C:\Users\Marty\Documents\Arduino\libraries\RTCZero-master\src\RTCZero.cpp:407:12: note: forward declaration of 'struct RTCZero::setAlarmEpoch(uint32_t)::tm'
struct tm* tmp = gmtime(&t);
^~
C:\Users\Marty\Documents\Arduino\libraries\RTCZero-master\src\RTCZero.cpp:409:23: error: invalid use of incomplete type 'struct RTCZero::setAlarmEpoch(uint32_t)::tm'
setAlarmDate(tmp->tm_mday, tmp->tm_mon + 1, tmp->tm_year - EPOCH_TIME_YEAR_OFF);
^~~~~~~
C:\Users\Marty\Documents\Arduino\libraries\RTCZero-master\src\RTCZero.cpp:407:12: note: forward declaration of 'struct RTCZero::setAlarmEpoch(uint32_t)::tm'
struct tm* tmp = gmtime(&t);
^~
C:\Users\Marty\Documents\Arduino\libraries\RTCZero-master\src\RTCZero.cpp:409:35: error: invalid use of incomplete type 'struct RTCZero::setAlarmEpoch(uint32_t)::tm'
setAlarmDate(tmp->tm_mday, tmp->tm_mon + 1, tmp->tm_year - EPOCH_TIME_YEAR_OFF);
^~
C:\Users\Marty\Documents\Arduino\libraries\RTCZero-master\src\RTCZero.cpp:407:12: note: forward declaration of 'struct RTCZero::setAlarmEpoch(uint32_t)::tm'
struct tm* tmp = gmtime(&t);
^~
C:\Users\Marty\Documents\Arduino\libraries\RTCZero-master\src\RTCZero.cpp:409:37: error: invalid use of incomplete type 'struct RTCZero::setAlarmEpoch(uint32_t)::tm'
setAlarmDate(tmp->tm_mday, tmp->tm_mon + 1, tmp->tm_year - EPOCH_TIME_YEAR_OFF);
^~~~~~
C:\Users\Marty\Documents\Arduino\libraries\RTCZero-master\src\RTCZero.cpp:407:12: note: forward declaration of 'struct RTCZero::setAlarmEpoch(uint32_t)::tm'
struct tm* tmp = gmtime(&t);
^~
C:\Users\Marty\Documents\Arduino\libraries\RTCZero-master\src\RTCZero.cpp:409:52: error: invalid use of incomplete type 'struct RTCZero::setAlarmEpoch(uint32_t)::tm'
setAlarmDate(tmp->tm_mday, tmp->tm_mon + 1, tmp->tm_year - EPOCH_TIME_YEAR_OFF);
^~
C:\Users\Marty\Documents\Arduino\libraries\RTCZero-master\src\RTCZero.cpp:407:12: note: forward declaration of 'struct RTCZero::setAlarmEpoch(uint32_t)::tm'
struct tm* tmp = gmtime(&t);
^~
C:\Users\Marty\Documents\Arduino\libraries\RTCZero-master\src\RTCZero.cpp:409:54: error: invalid use of incomplete type 'struct RTCZero::setAlarmEpoch(uint32_t)::tm'
setAlarmDate(tmp->tm_mday, tmp->tm_mon + 1, tmp->tm_year - EPOCH_TIME_YEAR_OFF);
^~~~~~~
C:\Users\Marty\Documents\Arduino\libraries\RTCZero-master\src\RTCZero.cpp:407:12: note: forward declaration of 'struct RTCZero::setAlarmEpoch(uint32_t)::tm'
struct tm* tmp = gmtime(&t);
^~
C:\Users\Marty\Documents\Arduino\libraries\RTCZero-master\src\RTCZero.cpp:410:21: error: invalid use of incomplete type 'struct RTCZero::setAlarmEpoch(uint32_t)::tm'
setAlarmTime(tmp->tm_hour, tmp->tm_min, tmp->tm_sec);
^~
C:\Users\Marty\Documents\Arduino\libraries\RTCZero-master\src\RTCZero.cpp:407:12: note: forward declaration of 'struct RTCZero::setAlarmEpoch(uint32_t)::tm'
struct tm* tmp = gmtime(&t);
^~
C:\Users\Marty\Documents\Arduino\libraries\RTCZero-master\src\RTCZero.cpp:410:23: error: invalid use of incomplete type 'struct RTCZero::setAlarmEpoch(uint32_t)::tm'
setAlarmTime(tmp->tm_hour, tmp->tm_min, tmp->tm_sec);
^~~~~~~
C:\Users\Marty\Documents\Arduino\libraries\RTCZero-master\src\RTCZero.cpp:407:12: note: forward declaration of 'struct RTCZero::setAlarmEpoch(uint32_t)::tm'
struct tm* tmp = gmtime(&t);
^~
C:\Users\Marty\Documents\Arduino\libraries\RTCZero-master\src\RTCZero.cpp:410:35: error: invalid use of incomplete type 'struct RTCZero::setAlarmEpoch(uint32_t)::tm'
setAlarmTime(tmp->tm_hour, tmp->tm_min, tmp->tm_sec);
^~
C:\Users\Marty\Documents\Arduino\libraries\RTCZero-master\src\RTCZero.cpp:407:12: note: forward declaration of 'struct RTCZero::setAlarmEpoch(uint32_t)::tm'
struct tm* tmp = gmtime(&t);
^~
C:\Users\Marty\Documents\Arduino\libraries\RTCZero-master\src\RTCZero.cpp:410:37: error: invalid use of incomplete type 'struct RTCZero::setAlarmEpoch(uint32_t)::tm'
setAlarmTime(tmp->tm_hour, tmp->tm_min, tmp->tm_sec);
^~~~~~
C:\Users\Marty\Documents\Arduino\libraries\RTCZero-master\src\RTCZero.cpp:407:12: note: forward declaration of 'struct RTCZero::setAlarmEpoch(uint32_t)::tm'
struct tm* tmp = gmtime(&t);
^~
C:\Users\Marty\Documents\Arduino\libraries\RTCZero-master\src\RTCZero.cpp:410:48: error: invalid use of incomplete type 'struct RTCZero::setAlarmEpoch(uint32_t)::tm'
setAlarmTime(tmp->tm_hour, tmp->tm_min, tmp->tm_sec);
^~
C:\Users\Marty\Documents\Arduino\libraries\RTCZero-master\src\RTCZero.cpp:407:12: note: forward declaration of 'struct RTCZero::setAlarmEpoch(uint32_t)::tm'
struct tm* tmp = gmtime(&t);
^~
C:\Users\Marty\Documents\Arduino\libraries\RTCZero-master\src\RTCZero.cpp:410:50: error: invalid use of incomplete type 'struct RTCZero::setAlarmEpoch(uint32_t)::tm'
setAlarmTime(tmp->tm_hour, tmp->tm_min, tmp->tm_sec);
^~~~~~
C:\Users\Marty\Documents\Arduino\libraries\RTCZero-master\src\RTCZero.cpp:407:12: note: forward declaration of 'struct RTCZero::setAlarmEpoch(uint32_t)::tm'
struct tm* tmp = gmtime(&t);
^~
C:\Users\Marty\Documents\Arduino\libraries\RTCZero-master\src\RTCZero.cpp: In member function 'void RTCZero::setEpoch(uint32_t)':
C:\Users\Marty\Documents\Arduino\libraries\RTCZero-master\src\RTCZero.cpp:422:22: error: 'gmtime' was not declared in this scope
struct tm* tmp = gmtime(&t);
^~~~~~
C:\Users\Marty\Documents\Arduino\libraries\RTCZero-master\src\RTCZero.cpp:422:22: note: suggested alternative: 'setTime'
struct tm* tmp = gmtime(&t);
^~~~~~
setTime
C:\Users\Marty\Documents\Arduino\libraries\RTCZero-master\src\RTCZero.cpp:426:29: error: invalid use of incomplete type 'struct RTCZero::setEpoch(uint32_t)::tm'
clockTime.bit.YEAR = tmp->tm_year - EPOCH_TIME_YEAR_OFF;
^~
C:\Users\Marty\Documents\Arduino\libraries\RTCZero-master\src\RTCZero.cpp:422:12: note: forward declaration of 'struct RTCZero::setEpoch(uint32_t)::tm'
struct tm* tmp = gmtime(&t);
^~
C:\Users\Marty\Documents\Arduino\libraries\RTCZero-master\src\RTCZero.cpp:426:31: error: invalid use of incomplete type 'struct RTCZero::setEpoch(uint32_t)::tm'
clockTime.bit.YEAR = tmp->tm_year - EPOCH_TIME_YEAR_OFF;
^~~~~~~
C:\Users\Marty\Documents\Arduino\libraries\RTCZero-master\src\RTCZero.cpp:422:12: note: forward declaration of 'struct RTCZero::setEpoch(uint32_t)::tm'
struct tm* tmp = gmtime(&t);
^~
C:\Users\Marty\Documents\Arduino\libraries\RTCZero-master\src\RTCZero.cpp:427:30: error: invalid use of incomplete type 'struct RTCZero::setEpoch(uint32_t)::tm'
clockTime.bit.MONTH = tmp->tm_mon + 1;
^~
C:\Users\Marty\Documents\Arduino\libraries\RTCZero-master\src\RTCZero.cpp:422:12: note: forward declaration of 'struct RTCZero::setEpoch(uint32_t)::tm'
struct tm* tmp = gmtime(&t);
^~
C:\Users\Marty\Documents\Arduino\libraries\RTCZero-master\src\RTCZero.cpp:427:32: error: invalid use of incomplete type 'struct RTCZero::setEpoch(uint32_t)::tm'
clockTime.bit.MONTH = tmp->tm_mon + 1;
^~~~~~
C:\Users\Marty\Documents\Arduino\libraries\RTCZero-master\src\RTCZero.cpp:422:12: note: forward declaration of 'struct RTCZero::setEpoch(uint32_t)::tm'
struct tm* tmp = gmtime(&t);
^~
C:\Users\Marty\Documents\Arduino\libraries\RTCZero-master\src\RTCZero.cpp:428:28: error: invalid use of incomplete type 'struct RTCZero::setEpoch(uint32_t)::tm'
clockTime.bit.DAY = tmp->tm_mday;
^~
Byly nalezené násobné knihovny "Wire.h"
Použitý: C:\Users\Marty\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.4\libraries\Wire
Byly nalezené násobné knihovny "SD.h"
Použitý: C:\Users\Marty\Documents\Arduino\libraries\SD
Nepoužitý: C:\Program
C:\Users\Marty\Documents\Arduino\libraries\RTCZero-master\src\RTCZero.cpp:422:12: note: forward declaration of 'struct RTCZero::setEpoch(uint32_t)::tm'
Byly nalezené násobné knihovny "MICS6814.h"
struct tm* tmp = gmtime(&t);
Použitý: C:\Users\Marty\Documents\Arduino\libraries\arduino-mics-6814-master
^~
Byly nalezené násobné knihovny "MICS-VZ-89TE.h"
C:\Users\Marty\Documents\Arduino\libraries\RTCZero-master\src\RTCZero.cpp:428:30: error: invalid use of incomplete type 'struct RTCZero::setEpoch(uint32_t)::tm'
Použitý: C:\Users\Marty\Documents\Arduino\libraries\MICS-VZ-89TE-master
Byly nalezené násobné knihovny "MQ131.h"
clockTime.bit.DAY = tmp->tm_mday;
Použitý: C:\Users\Marty\Documents\Arduino\libraries\mq131
^~~~~~~
Nepoužitý: C:\Users\Marty\Documents\Arduino\libraries\ozone
Nepoužitý: C:\Users\Marty\Documents\Arduino\libraries\hjj
Byly nalezené násobné knihovny "SPI.h"
Použitý: C:\Users\Marty\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.4\libraries\SPI
C:\Users\Marty\Documents\Arduino\libraries\RTCZero-master\src\RTCZero.cpp:422:12: note: forward declaration of 'struct RTCZero::setEpoch(uint32_t)::tm'
struct tm* tmp = gmtime(&t);
^~
Byly nalezené násobné knihovny "RTCZero.h"
C:\Users\Marty\Documents\Arduino\libraries\RTCZero-master\src\RTCZero.cpp:429:29: error: invalid use of incomplete type 'struct RTCZero::setEpoch(uint32_t)::tm'
Použitý: C:\Users\Marty\Documents\Arduino\libraries\RTCZero-master
clockTime.bit.HOUR = tmp->tm_hour;
^~
Byly nalezené násobné knihovny "Adafruit_BME280.h"
Použitý: C:\Users\Marty\Documents\Arduino\libraries\openCanSat-2.0-library-master
C:\Users\Marty\Documents\Arduino\libraries\RTCZero-master\src\RTCZero.cpp:422:12: note: forward declaration of 'struct RTCZero::setEpoch(uint32_t)::tm'
struct tm* tmp = gmtime(&t);
^~
C:\Users\Marty\Documents\Arduino\libraries\RTCZero-master\src\RTCZero.cpp:429:31: error: invalid use of incomplete type 'struct RTCZero::setEpoch(uint32_t)::tm'
clockTime.bit.HOUR = tmp->tm_hour;
^~~~~~~
C:\Users\Marty\Documents\Arduino\libraries\RTCZero-master\src\RTCZero.cpp:422:12: note: forward declaration of 'struct RTCZero::setEpoch(uint32_t)::tm'
struct tm* tmp = gmtime(&t);
^~
C:\Users\Marty\Documents\Arduino\libraries\RTCZero-master\src\RTCZero.cpp:430:31: error: invalid use of incomplete type 'struct RTCZero::setEpoch(uint32_t)::tm'
clockTime.bit.MINUTE = tmp->tm_min;
^~
C:\Users\Marty\Documents\Arduino\libraries\RTCZero-master\src\RTCZero.cpp:422:12: note: forward declaration of 'struct RTCZero::setEpoch(uint32_t)::tm'
struct tm* tmp = gmtime(&t);
^~
C:\Users\Marty\Documents\Arduino\libraries\RTCZero-master\src\RTCZero.cpp:430:33: error: invalid use of incomplete type 'struct RTCZero::setEpoch(uint32_t)::tm'
clockTime.bit.MINUTE = tmp->tm_min;
^~~~~~
C:\Users\Marty\Documents\Arduino\libraries\RTCZero-master\src\RTCZero.cpp:422:12: note: forward declaration of 'struct RTCZero::setEpoch(uint32_t)::tm'
struct tm* tmp = gmtime(&t);
^~
C:\Users\Marty\Documents\Arduino\libraries\RTCZero-master\src\RTCZero.cpp:431:31: error: invalid use of incomplete type 'struct RTCZero::setEpoch(uint32_t)::tm'
clockTime.bit.SECOND = tmp->tm_sec;
^~
C:\Users\Marty\Documents\Arduino\libraries\RTCZero-master\src\RTCZero.cpp:422:12: note: forward declaration of 'struct RTCZero::setEpoch(uint32_t)::tm'
struct tm* tmp = gmtime(&t);
^~
C:\Users\Marty\Documents\Arduino\libraries\RTCZero-master\src\RTCZero.cpp:431:33: error: invalid use of incomplete type 'struct RTCZero::setEpoch(uint32_t)::tm'
clockTime.bit.SECOND = tmp->tm_sec;
^~~~~~
C:\Users\Marty\Documents\Arduino\libraries\RTCZero-master\src\RTCZero.cpp:422:12: note: forward declaration of 'struct RTCZero::setEpoch(uint32_t)::tm'
struct tm* tmp = gmtime(&t);
^~
exit status 1
Nastala chyba při kompilaci u desky Arduino M0.
Táto zpráva by měla mít víc informacií v
"Zobrazení podrobného výstupu při kompilaci"
podle zapnuté volby v Soubor -> Nastavení.