IU5HKU / MiniWXStation

ESP8266 and BME280 sensor for a minimalist weather station to put on your terrace
31 stars 20 forks source link

Issues to configure the MiniWXstation #8

Closed gregbartels closed 3 years ago

gregbartels commented 3 years ago

Hi there,

This is Greg, TI2GBB from Costa Rica, I´m trying to configure this project using arduino IDE 1.8.13

I´m getting this error when I tried to upload the code to the ESP8266

_Arduino:1.8.13 (Windows 10), board:"NodeMCU 1.0 (ESP-12E Module), 80 MHz, Flash, Legacy (new can return nullptr), All SSL ciphers (most compatible), 4MB (FS:2MB OTA:~1019KB), 2, v2 Lower Memory, Disabled, None, Only Sketch, 57600"

In file included from C:\Users\Gregory\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.4/tools/sdk/libc/xtensa-lx106-elf/include/sys/stdio.h:6:0,

             from C:\Users\Gregory\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.4/tools/sdk/libc/xtensa-lx106-elf/include/stdio.h:63,

             from C:\Users\Gregory\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.4\cores\esp8266/Arduino.h:32,

             from sketch\bme_V09.ino.cpp:1:

C:\Users\Gregory\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.4/tools/sdk/libc/xtensa-lx106-elf/include/sys/pgmspace.h:25:130: error: 'const char HTTP_HEAD []' redeclared as different kind of symbol

define PROGMEM attribute((section( "\".irom.text." FILE "." STRINGIZE(LINE) "." STRINGIZE(COUNTER) "\"")))

                                                                                                                              ^

C:\Users\Gregory\Desktop\MiniWXStation-master\V09\bme_V09\bme_V09.ino:465:24: note: in expansion of macro 'PROGMEM'

const char HTTP_HEAD[] PROGMEM = "<!DOCTYPE html>{{callsign}} Weather Station";

                    ^

In file included from C:\Users\Gregory\Desktop\MiniWXStation-master\V09\bme_V09\bme_V09.ino:34:0:

C:\Users\Gregory\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.4\libraries\ESP8266WebServer\src/ESP8266WebServer.h:34:39: error: previous declaration of 'HTTPMethod HTTP_HEAD'

enum HTTPMethod { HTTP_ANY, HTTP_GET, HTTP_HEAD, HTTP_POST, HTTP_PUT, HTTP_PATCH, HTTP_DELETE, HTTP_OPTIONS };

                                   ^

exit status 1

Error compiling from board NodeMCU 1.0 (ESP-12E Module)._

I would like to request help to fix this problem, I´m not arduino expert, I´m uploading the code however is failing, I really want to understand and fix this issue to share the knowledge with other HAM Radio colleagues and boy scouts of my Area.

Thanks in advance!

IU5HKU commented 3 years ago

Hi Greg, there is a know compatibility issue between MiniWX_v09 and the newest ESP8266 SDK, related to the use of "HTTP_HEAD" tag i used in source code. At that times HTTP_HEAD was not used inside SDK, so there wasn't any problem at all, in the newest SDK instead HTTP_HEAD is (at good reason) used so the "redeclaration" message from the compiler. Please consider using the new 1.1f version of MiniWX or instead rename all the occurrencies of HTTP_HEAD inside miniwx source code in something else, as example "HTTP_HEADER". This should fix the problem, let me know.

IU5HKU commented 3 years ago

Just changed it for you, try to download and compile the new v09, now everything should be fine (but still consider to use the latest v1.1f...)