vortigont/espem

Espem help

andrewkik opened this issue · 1 comments

checking the sketch gives an error. can you help?

Arduino: 1.8.7 (Windows 7), Плата:"NodeMCU 1.0 (ESP-12E Module), 80 MHz, Flash, Enabled, 4M (no SPIFFS), v2 Lower Memory, Disabled, None, Only Sketch, 115200"

In file included from sketch\main.h:14:0,

             from C:\Users\пк\Desktop\ремонт\Ваттметр\espem-1.1.0\espem-1.1.0\espem\espem.ino:10:

http.h:3:30: error: 'PMeterESP_VER' was not declared in this scope

const char PROGMEM PGver[] = PMeterESP_VER;

                          ^

In file included from C:\Users\пк\Desktop\ремонт\Ваттметр\espem-1.1.0\espem-1.1.0\espem\espem.ino:10:0:

sketch\main.h: In function 'void cfgReset(cfg&)':

main.h:67:51: error: 'WIFI_PASSWD' was not declared in this scope

 snprintf(conf.cWpwd, sizeof conf.cWpwd, "%s", WIFI_PASSWD);

                                               ^

main.h:69:20: error: 'POLL_MODE' was not declared in this scope

 conf.cpoll   = POLL_MODE;

                ^

main.h:70:23: error: 'POLL_PERIOD' was not declared in this scope

 conf.cpoll_period=POLL_PERIOD;

                   ^

main.h:71:20: error: 'PF_CORRECTION' was not declared in this scope

 conf.cpf_fix = PF_CORRECTION;

                ^

main.h:72:55: error: 'OTA_url' was not declared in this scope

 snprintf(conf.cOTAurl, sizeof conf.cOTAurl, "%s", OTA_url);

                                                   ^

sketch\main.h: At global scope:

main.h:118:15: error: 'POLL_SAMPLES' was not declared in this scope

float samples[POLL_SAMPLES ? POLL_SAMPLES : 1][3] = {0.0}; // at least 1 element array

           ^

main.h:118:30: error: 'POLL_SAMPLES' was not declared in this scope

float samples[POLL_SAMPLES ? POLL_SAMPLES : 1][3] = {0.0}; // at least 1 element array

                          ^

main.h:154:58: error: 'PF_CORRECTION' was not declared in this scope

bool pollMeter(PZEM004T* meter, float result[] , bool PF=PF_CORRECTION);

                                                      ^

espem:30:17: error: 'PIN_RX' was not declared in this scope

espem:30:25: error: 'PIN_TX' was not declared in this scope

C:\Users\пк\Desktop\ремонт\Ваттметр\espem-1.1.0\espem-1.1.0\espem\functions.ino: In function 'void onSTAGotIP(WiFiEventStationModeGotIP)':

functions:48:13: error: 'NTP_SERVER' was not declared in this scope

functions:48:25: error: 'TZ' was not declared in this scope

functions:48:29: error: 'TZ_DL' was not declared in this scope

functions:49:19: error: 'NTP_INTERVAL' was not declared in this scope

C:\Users\пк\Desktop\ремонт\Ваттметр\espem-1.1.0\espem-1.1.0\espem\functions.ino: In function 'void datapoller()':

functions:128:9: error: 'POLL_SAMPLES' was not declared in this scope

functions:131:43: error: 'samples' was not declared in this scope

functions:132:23: error: 'POLL_SAMPLES' was not declared in this scope

C:\Users\пк\Desktop\ремонт\Ваттметр\espem-1.1.0\espem-1.1.0\espem\functions.ino: In function 'void otaclient(const String&)':

functions:217:55: error: 'OTA_ver' was not declared in this scope

C:\Users\пк\Desktop\ремонт\Ваттметр\espem-1.1.0\espem-1.1.0\espem\http.ino: In function 'void wcfgset()':

http:53:3: error: 'StaticJsonBuffer' was not declared in this scope

http:53:32: error: 'buff' was not declared in this scope

http:56:16: error: 'ArduinoJson::JsonObject' has no member named 'success'

C:\Users\пк\Desktop\ремонт\Ваттметр\espem-1.1.0\espem-1.1.0\espem\http.ino: In function 'void wsamples()':

http:105:9: error: 'POLL_SAMPLES' was not declared in this scope

http:120:30: error: 'POLL_SAMPLES' was not declared in this scope

http:122:16: error: 'samples' was not declared in this scope

Несколько библиотек найдено для "PZEM004T.h"
Используется: C:\Users\пк\Desktop\ремонт\Arduino\Sketch\libraries\PZEM004T-master
Не используется: C:\Users\пк\Desktop\ремонт\Arduino\arduino-1.8.7-windows\arduino-1.8.7\libraries\POW_1.0
exit status 1
'PMeterESP_VER' was not declared in this scope

Этот отчёт будет иметь больше информации с
включенной опцией Файл -> Настройки ->
"Показать подробный вывод во время компиляции"

@andrewkik you should rename file config.h.distrib into config.h and change default values to your needs, than build the project.