SD.rar - это файл , которым надо заменить стандартную страницу SD в AMS. Далее через менеджер библиотек скачать саму библиотеку Sdfat.h Я использовал последнюю версию.Sps писал(а):.. решил поставить SdFat.h скачал библиотеку и файл sd.rar [1.47 КБ] в a_m_s дописал #include <SdFat.h> компилятор ругается на строку файла sd.rar
Arduino Mega Server
Модератор: Alex
-
- Сообщения: 2575
- Зарегистрирован: Пт ноя 06, 2015 10:22 am
- Откуда: Кишинёв
- Благодарил (а): 303 раза
- Поблагодарили: 282 раза
Re: Arduino Mega Server
СпойлерПоказать
AMS : ESP32 + NRF24 + 1Wire-I2C мост DS2482 + счетчик DS2423 + сеть MySensors + редактирование страниц в браузере + Upload по воздуху + SPIFFS
-
- Сообщения: 45
- Зарегистрирован: Вт окт 27, 2015 4:23 pm
- Благодарил (а): 6 раз
- Поблагодарили: 1 раз
Re: Arduino Mega Server
библиотеку SdFat скачал версия 1.0.5 все сделал как по учебнику, компилятор криком кричит похоже не может договориться с Modul RTC, разбираюсь дальше...serghei писал(а):
SD.rar - это файл , которым надо заменить стандартную страницу SD в AMS. Далее через менеджер библиотек скачать саму библиотеку Sdfat.h Я использовал последнюю версию.СпойлерПоказать
СпойлерПоказать
arduino_mega_server:316: error: variable or field 'showDuration' declared void
arduino_mega_server:316: error: 'time_t' was not declared in this scope
arduino_mega_server:317: error: variable or field 'checkEvent' declared void
arduino_mega_server:317: error: 'time_t' was not declared in this scope
arduino_mega_server:317: error: 'prevEvent' was not declared in this scope
arduino_mega_server:428: error: 'time_t' does not name a type
dmajor.ino: In function 'void majordomoMegaLive()':
dmajor:176: error: 'checkEvent' was not declared in this scope
rtc.ino: In function 'void rtcInit()':
rtc:13: error: 'getNtpTime' was not declared in this scope
rtc.ino: In function 'void rtcSync()':
rtc:27: error: 'getNtpTime' was not declared in this scope
arduino_mega_server:316: error: 'time_t' was not declared in this scope
arduino_mega_server:317: error: variable or field 'checkEvent' declared void
arduino_mega_server:317: error: 'time_t' was not declared in this scope
arduino_mega_server:317: error: 'prevEvent' was not declared in this scope
arduino_mega_server:428: error: 'time_t' does not name a type
dmajor.ino: In function 'void majordomoMegaLive()':
dmajor:176: error: 'checkEvent' was not declared in this scope
rtc.ino: In function 'void rtcInit()':
rtc:13: error: 'getNtpTime' was not declared in this scope
rtc.ino: In function 'void rtcSync()':
rtc:27: error: 'getNtpTime' was not declared in this scope
-
- Сообщения: 791
- Зарегистрирован: Пт янв 22, 2016 10:08 am
- Благодарил (а): 6 раз
- Поблагодарили: 63 раза
Re: Arduino Mega Server
Вы пытаетесь обратится к тому чего нет,вернее есть но на данный момент закрыто директивами условной компиляции
откройте это
откройте это
//#define NTP_FEATURE
//#define MAJORDOMO_FEATURE
-
- Сообщения: 45
- Зарегистрирован: Вт окт 27, 2015 4:23 pm
- Благодарил (а): 6 раз
- Поблагодарили: 1 раз
Re: Arduino Mega Server
строка #define NTP_FEATURE была открыта, а #define MAJORDOMO_FEATURE[ я открыл но ошибок стало еще большеalexsis_76 писал(а):Вы пытаетесь обратится к тому чего нет,вернее есть но на данный момент закрыто директивами условной компиляции откройте это//#define NTP_FEATURE
//#define MAJORDOMO_FEATURE
СпойлерПоказать
arduino_mega_server:316: error: variable or field 'showDuration' declared void
arduino_mega_server:316: error: 'time_t' was not declared in this scope
arduino_mega_server:317: error: variable or field 'checkEvent' declared void
arduino_mega_server:317: error: 'time_t' was not declared in this scope
arduino_mega_server:317: error: 'prevEvent' was not declared in this scope
arduino_mega_server:428: error: 'time_t' does not name a type
dmajor.ino: In function 'void majordomoMegaLive()':
dmajor:176: error: 'checkEvent' was not declared in this scope
rtc.ino: In function 'void rtcInit()':
rtc:13: error: 'getNtpTime' was not declared in this scope
rtc.ino: In function 'void rtcSync()':
rtc:27: error: 'getNtpTime' was not declared in this scope
arduino_mega_server:316: error: variable or field 'showDuration' declared void
arduino_mega_server:316: error: 'time_t' was not declared in this scope
arduino_mega_server:317: error: variable or field 'checkEvent' declared void
arduino_mega_server:317: error: 'time_t' was not declared in this scope
arduino_mega_server:317: error: 'prevEvent' was not declared in this scope
arduino_mega_server:428: error: 'time_t' does not name a type
dmajor.ino: In function 'void majordomoMegaLive()':
dmajor:176: error: 'checkEvent' was not declared in this scope
rtc.ino: In function 'void rtcInit()':
rtc:13: error: 'getNtpTime' was not declared in this scope
rtc.ino: In function 'void rtcSync()':
rtc:27: error: 'getNtpTime' was not declared in this scope
arduino_mega_server:316: error: 'time_t' was not declared in this scope
arduino_mega_server:317: error: variable or field 'checkEvent' declared void
arduino_mega_server:317: error: 'time_t' was not declared in this scope
arduino_mega_server:317: error: 'prevEvent' was not declared in this scope
arduino_mega_server:428: error: 'time_t' does not name a type
dmajor.ino: In function 'void majordomoMegaLive()':
dmajor:176: error: 'checkEvent' was not declared in this scope
rtc.ino: In function 'void rtcInit()':
rtc:13: error: 'getNtpTime' was not declared in this scope
rtc.ino: In function 'void rtcSync()':
rtc:27: error: 'getNtpTime' was not declared in this scope
arduino_mega_server:316: error: variable or field 'showDuration' declared void
arduino_mega_server:316: error: 'time_t' was not declared in this scope
arduino_mega_server:317: error: variable or field 'checkEvent' declared void
arduino_mega_server:317: error: 'time_t' was not declared in this scope
arduino_mega_server:317: error: 'prevEvent' was not declared in this scope
arduino_mega_server:428: error: 'time_t' does not name a type
dmajor.ino: In function 'void majordomoMegaLive()':
dmajor:176: error: 'checkEvent' was not declared in this scope
rtc.ino: In function 'void rtcInit()':
rtc:13: error: 'getNtpTime' was not declared in this scope
rtc.ino: In function 'void rtcSync()':
rtc:27: error: 'getNtpTime' was not declared in this scope
-
- Сообщения: 791
- Зарегистрирован: Пт янв 22, 2016 10:08 am
- Благодарил (а): 6 раз
- Поблагодарили: 63 раза
Re: Arduino Mega Server
time_t связано с отсутствием библиотеки,скорей всего это библиотека времениerror: 'time_t' was not declared in this scope
getNtpTime не определена должно быть расскоментировано #define NTP_FEATURE она там находитсяrtc.ino: In function 'void rtcInit()':
rtc:13: error: 'getNtpTime' was not declared in this scope
про checkEvent ошибся.
Re: Arduino Mega Server
с библиотекой TimeLib уже разобрался, у меня в файле Time.h есть только надпись #include "TimeLib.h", просто в скетче поменял Time на TimeLib и скетч начал компилироваться без ошибок. Но возникла проблема, ничего не мог залить в модуль... долго долбался, пробовал разные варианты, пробовал заливать скетчи с примерами из библиотек... в итоге после выбора в настройках платы ESPDuino доблися желаемого результата, скетч залетел и после перезагрузки, я наконец получил "рабочий сервер" (у меня MEGA+ESP от robotdyn, на меге сервер вроде работает, но блин китайские модули W5100 с их резисторами... короче с мегой пока отложил и решил пробовать с есп). На данный момент нет синхронизации времени через интернет, сколько не пытался, заливал чистый АМС для есп8266 - синхронизации нет, пробовал NTPClient из примеров, синхронизация есть, сравнивал пример с скетчем AМС не нашел в последней прописанной библиотеки WiFiUdp.h (хотя обращения по UDP есть), добавил на всякий случай - результата нет. Во всех скетчах, кроме wi-fi логин/пароль ничего не менял.serghei писал(а):Посмотри тему Отсюда и дальше по тексту.Vermaht писал(а): помогите разобраться, купил плату mega+esp от роботдин....игрался с версиями библиотеки time и версиями atduino IDE (пробовал в 1.8.0 и в 1.6.5) проблема одна и та же "'setSyncProvider' was not declared in this scope", пробовал пример из библиотеки time "TimeNTP_ESP8266WiFi.ino" скетч компилируется, а скетч AMS нетPS. А Вы абсолютно уверены в своем Имени на форуме??СпойлерПоказать
СпойлерПоказать
AMS for RobotDynESP started...
Modul Hardware...
SDK version: 2.1.0(deb1901)
Boot version: 31
Boot mode: 1
Reset info: Fatal exception:0 flag:6 (EXT_SYS_RST) epc1:0x00000000 epc2:0x00000000 epc3:0x00000000 excvaddr:0x00000000 depc:0x00000000
CPU freq: 80 MHz
Free memory: 37264 (80%)
Flash speed: 40 MHz
Flash mode: 2
Flash size: 4194304
SPIFFS size: 3146352
Program size: 1047952
Sketch size: 335248
Free for sketch: 712704
started
Modul Wi-Fi...
Connecting to asus
.
WiFi connected
IP address: 192.168.1.51
started
Modul SPIFFS...
Total files: 141
Total size: 2039037
started
Modul Random... started
Modul EEPROM...
Name: RobotDynESP
started
Modul NTP...
Local port: 2390
started
Modul RTC...
Set time provider
sending NTP packet...
No packet yet
started
1970-01-01 00:00:01 Modul HTTP...
1970-01-01 00:00:01 HTTP port: 8080
1970-01-01 00:00:01 started
1970-01-01 00:00:01 Modul Server... started
1970-01-01 00:00:01 Modul RobotDyn... started
GLOBAL Init DONE (1s)
AMS WORK
1970-01-01 00:00:01 : 33744 (73%) 33744
?esp=1
?esp=1
?esp=1
?esp=1
?esp=1
?esp=1
?esp=1
?esp=1
?esp=1
sending NTP packet...
No packet yet
?esp=1
Modul Hardware...
SDK version: 2.1.0(deb1901)
Boot version: 31
Boot mode: 1
Reset info: Fatal exception:0 flag:6 (EXT_SYS_RST) epc1:0x00000000 epc2:0x00000000 epc3:0x00000000 excvaddr:0x00000000 depc:0x00000000
CPU freq: 80 MHz
Free memory: 37264 (80%)
Flash speed: 40 MHz
Flash mode: 2
Flash size: 4194304
SPIFFS size: 3146352
Program size: 1047952
Sketch size: 335248
Free for sketch: 712704
started
Modul Wi-Fi...
Connecting to asus
.
WiFi connected
IP address: 192.168.1.51
started
Modul SPIFFS...
Total files: 141
Total size: 2039037
started
Modul Random... started
Modul EEPROM...
Name: RobotDynESP
started
Modul NTP...
Local port: 2390
started
Modul RTC...
Set time provider
sending NTP packet...
No packet yet
started
1970-01-01 00:00:01 Modul HTTP...
1970-01-01 00:00:01 HTTP port: 8080
1970-01-01 00:00:01 started
1970-01-01 00:00:01 Modul Server... started
1970-01-01 00:00:01 Modul RobotDyn... started
GLOBAL Init DONE (1s)
AMS WORK
1970-01-01 00:00:01 : 33744 (73%) 33744
?esp=1
?esp=1
?esp=1
?esp=1
?esp=1
?esp=1
?esp=1
?esp=1
?esp=1
sending NTP packet...
No packet yet
?esp=1
-
- Сообщения: 45
- Зарегистрирован: Вт окт 27, 2015 4:23 pm
- Благодарил (а): 6 раз
- Поблагодарили: 1 раз
Re: Arduino Mega Server
время у меня выводится нормально синхронизируется и через интернет и по DS3231 почему вдруг time_t непонятноalexsis_76 писал(а):time_t связано с отсутствием библиотеки,скорей всего это библиотека времениerror: 'time_t' was not declared in this scope
а строка #define NTP_FEATURE у меня расскомментирована я ее не трогал.
прошу прощения как засунуть картинку в spoller я не нашел и выше не хочет становится как-то сама по себе короче, это время.
- Вложения
-
- 1.jpg (81.14 КБ) 7323 просмотра
-
- Сообщения: 791
- Зарегистрирован: Пт янв 22, 2016 10:08 am
- Благодарил (а): 6 раз
- Поблагодарили: 63 раза
-
- Сообщения: 45
- Зарегистрирован: Вт окт 27, 2015 4:23 pm
- Благодарил (а): 6 раз
- Поблагодарили: 1 раз
Re: Arduino Mega Server
вот и я не пойму похоже проблема на ровном месте, а точно все это работает на AMС 0.16 Mega + W5100
-
- Сообщения: 791
- Зарегистрирован: Пт янв 22, 2016 10:08 am
- Благодарил (а): 6 раз
- Поблагодарили: 63 раза
Re: Arduino Mega Server
да вы вроде первый у кого не работает.вот и я не пойму похоже проблема на ровном месте, а точно все это работает на AMС 0.16 Mega + W5100
на 1,6,5 компилируется без ошибок