Третью ночь пытаюсь установить на Мегу 2560 в связке с Ethernet-шилдом AMS. Делал всё в точности, как в инструкции на hi-lab.ru, кроме:
1. Версия Arduino IDE 1.6.12. Стоит эта так-как версия 1.6.5 на Windows 10 отказалась работать;
2. А второго нет, остальное по инструкции.
При первой попытке компиляции, IDE пожаловалась на отсутствие ICMPPing.h. Я скачал эту библиотеку от сюда https://github.com/BlakeFoster/Arduino- ... /icmp_ping, установил и теперь IDE выдаёт следующие ошибки:
Что я делаю не верно, подскажите!!!ВНИМАНИЕ: Категория '' в библиотеке Ethernet2 не является действительной. Установка на 'Uncategorized'
In file included from D:\Sketches\ams\Arduino\arduino_mega_server\arduino_mega_server.ino:115:0:
D:\Sketches\ams\Arduino\libraries\DS1307RTC/DS1307RTC.h:19:22: error: 'tmElements_t' has not been declared
static bool read(tmElements_t &tm);
^
D:\Sketches\ams\Arduino\libraries\DS1307RTC/DS1307RTC.h:20:23: error: 'tmElements_t' has not been declared
static bool write(tmElements_t &tm);
^
contacts:12: error: expected unqualified-id before numeric constant
#define CLOSE 0
^
D:\Sketches\ams\Arduino\libraries\Ethernet\src/utility/w5100.h:58:24: note: in expansion of macro 'CLOSE'
static const uint8_t CLOSE = 0x00;
^
ping:30: error: no matching function for call to 'ICMPPing::ICMPPing(SOCKET&)'
ICMPPing ping(pingSocket);
^
D:\Sketches\ams\Arduino\arduino_mega_server\ping.ino:30:25: note: candidates are:
In file included from D:\Sketches\ams\Arduino\arduino_mega_server\ping.ino:11:0:
D:\Sketches\ams\Arduino\libraries\icmp_ping/ICMPPing.h:138:5: note: ICMPPing::ICMPPing(SOCKET, uint8_t)
ICMPPing(SOCKET s, uint8_t id);
^
D:\Sketches\ams\Arduino\libraries\icmp_ping/ICMPPing.h:138:5: note: candidate expects 2 arguments, 1 provided
D:\Sketches\ams\Arduino\libraries\icmp_ping/ICMPPing.h:125:7: note: constexpr ICMPPing::ICMPPing(const ICMPPing&)
class ICMPPing
^
D:\Sketches\ams\Arduino\libraries\icmp_ping/ICMPPing.h:125:7: note: no known conversion for argument 1 from 'SOCKET {aka unsigned char}' to 'const ICMPPing&'
D:\Sketches\ams\Arduino\libraries\icmp_ping/ICMPPing.h:125:7: note: constexpr ICMPPing::ICMPPing(ICMPPing&&)
D:\Sketches\ams\Arduino\libraries\icmp_ping/ICMPPing.h:125:7: note: no known conversion for argument 1 from 'SOCKET {aka unsigned char}' to 'ICMPPing&&'
D:\Sketches\ams\Arduino\arduino_mega_server\ping.ino: In function 'void pingWorks()':
ping:42: error: no match for call to '(ICMPPing) (int, byte [4], char [64])'
online[countOnline] = ping(1, ips[countOnline], pingMessage);
^
In file included from D:\Sketches\ams\Arduino\arduino_mega_server\ping.ino:11:0:
D:\Sketches\ams\Arduino\libraries\icmp_ping/ICMPPing.h:125:7: note: candidates are:
class ICMPPing
^
D:\Sketches\ams\Arduino\libraries\icmp_ping/ICMPPing.h:165:19: note: ICMPEchoReply ICMPPing::operator()(const IPAddress&, int)
ICMPEchoReply operator()(const IPAddress&, int nRetries);
^
D:\Sketches\ams\Arduino\libraries\icmp_ping/ICMPPing.h:165:19: note: candidate expects 2 arguments, 3 provided
D:\Sketches\ams\Arduino\libraries\icmp_ping/ICMPPing.h:176:10: note: void ICMPPing::operator()(const IPAddress&, int, ICMPEchoReply&)
void operator()(const IPAddress& addr, int nRetries, ICMPEchoReply& result);
^
D:\Sketches\ams\Arduino\libraries\icmp_ping/ICMPPing.h:176:10: note: no known conversion for argument 3 from 'char [64]' to 'ICMPEchoReply&'
D:\Sketches\ams\Arduino\arduino_mega_server\rtc.ino: In function 'void rtcInit()':
rtc:10: error: 'setSyncProvider' was not declared in this scope
setSyncProvider(getNtpTime);
^
rtc:14: error: 'setSyncProvider' was not declared in this scope
setSyncProvider(RTC.get); // get time from RTC
^
D:\Sketches\ams\Arduino\arduino_mega_server\rtc.ino: In function 'void rtcSync()':
rtc:24: error: 'setSyncProvider' was not declared in this scope
setSyncProvider(getNtpTime);
^
rtc:26: error: 'timeStatus' was not declared in this scope
if (timeStatus() != timeNotSet) {
^
rtc:26: error: 'timeNotSet' was not declared in this scope
if (timeStatus() != timeNotSet) {
^
D:\Sketches\ams\Arduino\arduino_mega_server\rtc.ino: In function 'void serialRTC()':
rtc:42: error: 'year' was not declared in this scope
Serial.print(year());
^
rtc:44: error: 'month' was not declared in this scope
printDigits(month());
^
rtc:46: error: 'day' was not declared in this scope
printDigits(day());
^
rtc:48: error: 'hour' was not declared in this scope
printDigits(hour());
^
rtc:50: error: 'minute' was not declared in this scope
printDigits(minute());
^
rtc:52: error: 'second' was not declared in this scope
printDigits(second());
^
D:\Sketches\ams\Arduino\arduino_mega_server\rtc.ino: In function 'void showDuration(time_t)':
rtc:73: error: 'SECS_PER_DAY' was not declared in this scope
if(duration >= SECS_PER_DAY){
^
rtc:78: error: 'SECS_PER_HOUR' was not declared in this scope
if(duration >= SECS_PER_HOUR){
^
rtc:83: error: 'SECS_PER_MIN' was not declared in this scope
if(duration >= SECS_PER_MIN){
^
D:\Sketches\ams\Arduino\arduino_mega_server\rtc.ino: In function 'void checkEvent(time_t*)':
rtc:94: error: 'now' was not declared in this scope
time_t timeNow = now();
^
D:\Sketches\ams\Arduino\arduino_mega_server\rtc.ino: In function 'void setNtpInterval()':
rtc:149: error: 'timeStatus' was not declared in this scope
if (timeStatus() == timeNotSet) {
^
rtc:149: error: 'timeNotSet' was not declared in this scope
if (timeStatus() == timeNotSet) {
^
rtc:150: error: 'setSyncInterval' was not declared in this scope
setSyncInterval(18);
^
D:\Sketches\ams\Arduino\arduino_mega_server\server_ajax.ino: In function 'String makeTime()':
server_ajax:226: error: 'hour' was not declared in this scope
s += makeDigits(hour());
^
server_ajax:227: error: 'second' was not declared in this scope
if (second() % 2 == 0) {s += " ";}
^
server_ajax:229: error: 'minute' was not declared in this scope
s += makeDigits(minute());
^
D:\Sketches\ams\Arduino\arduino_mega_server\server_ajax.ino: In function 'void responseDash(EthernetClient)':
server_ajax:789: error: 'day' was not declared in this scope
s += makeTag("day", "", String(day()));
^
server_ajax:790: error: 'month' was not declared in this scope
s += makeTag("month", "", String(month()));
^
server_ajax:791: error: 'weekday' was not declared in this scope
s += makeTag("weekday", "", String(weekday()));
^
D:\Sketches\ams\Arduino\arduino_mega_server\tntp.ino: In function 'time_t getNtpTime()':
tntp:54: error: 'setSyncInterval' was not declared in this scope
setSyncInterval(3600);
^
tntp:55: error: 'SECS_PER_HOUR' was not declared in this scope
return secsSince1900 - 2208988800UL + timeZone * SECS_PER_HOUR;
^
tntp:59: error: 'setSyncInterval' was not declared in this scope
setSyncInterval(18);
^
D:\Sketches\ams\Arduino\arduino_mega_server\upload.ino: In function 'void uploadWorks()':
upload:160: error: 'setSyncProvider' was not declared in this scope
setSyncProvider(RTC.get);
^
upload:162: error: 'timeStatus' was not declared in this scope
if (timeStatus() != timeSet) {
^
upload:162: error: 'timeSet' was not declared in this scope
if (timeStatus() != timeSet) {
^
Несколько библиотек найдено для "Ethernet.h"
Используется: D:\Sketches\ams\Arduino\libraries\Ethernet
Не используется: C:\Program Files (x86)\Arduino\libraries\Ethernet
exit status 1
expected unqualified-id before numeric constant