This project is horrible and you should not use it. It has multiple problems.
The first error is
In file included from .pio\libdeps\esp32dev\NetApiHelpers\src/ArduinoWiFiServer.h:50:0,
from .pio\libdeps\esp32dev\TelnetStream\src/NetTypes.h:38,
from .pio\libdeps\esp32dev\TelnetStream\src/TelnetStream.h:22,
from src\main.cpp:12:
.pio\libdeps\esp32dev\NetApiHelpers\src/ServerTemplate.h: In instantiation of ‘class ServerTemplate<WiFiServer, WiFiClient>’:
.pio\libdeps\esp32dev\TelnetStream\src/TelnetStream.h:27:13: required from here
.pio\libdeps\esp32dev\NetApiHelpers\src/ServerTemplate.h:118:16: error: ‘void ServerTemplate<TServer, TClient>::flush() [with TServer = WiFiServer; TClient = WiFiClient]’ marked ‘override’, but does not override
Which comes from the TelnetStream library. You see that in the platformio.ini
,
[env:esp32dev]
platform = espressif32@3.5.0
board = esp32dev
framework = arduino
lib_deps =
adafruit/DHT sensor library@^1.4.2
adafruit/Adafruit Unified Sensor@^1.1.4
lbernstone/Tone32@^1.0.0
adafruit/Adafruit INA219@^1.2.0
adafruit/Adafruit NeoPixel@^1.10.5
fbiego/ESP32Time@^2.0.0
arduino-libraries/NTPClient@^3.2.1
jandrassy/TelnetStream@^1.2.2
which we note:
espressif32@3.5.0
is outdated by now, from two years ago; it runs under Arduino-ESP32 core 1.0.6.
- The wanted version of the
TelnetStream
was 1.2.2
. The SemVer expression ^1.2.2
will make it select the latest 1.x.x version though, which is 1.3.0.
The problem is that the TelnetStream 1.3.0 library is not compatible with the 1.0.6 core anymore. Fruther, the 1.2.2 version was removed from the registry (https://registry.platformio.org/libraries/jandrassy/TelnetStream/versions), the oldest 1.2.x version is 1.2.4. We can of course still download the 1.2.2 version from their github. The 1.2.4 version is good enough, so we use
jandrassy/TelnetStream@1.2.4
instead of jandrassy/TelnetStream@^1.2.2
. That will make that error go away.
Next, and this shows that the project was not well made, are countless errors about undeclared variables, e.g.,
src\main.cpp:27:32: error: 'dataLedPin' was not declared in this scope
Adafruit_NeoPixel ledMerci(34, dataLedPin, NEO_GRB + NEO_KHZ800);
^
src\main.cpp: In function 'void turnOFFLedMerci()':
src\main.cpp:65:16: error: 'powerLedPin' was not declared in this scope
digitalWrite(powerLedPin, LOW);
^
src\main.cpp:66:16: error: 'dataLedPin' was not declared in this scope
digitalWrite(dataLedPin, LOW);
Even after renaming src/config_sample.h
into src/config.h
, these variables / macros just don’t exist in there. There is no e.g. dataLedPin
macro in that config file. Only
On the other hand, some declared macros are not used at all. E.g., the main.cpp
code does not use ledPin
. It only uses dataLedPin
. So, we can only guess here what the config_sample.h
should be to make the code compile. The given file is just incorrect.