I was attempting to follow the recommendations on this thread to get an SHT20 working in ESPHome on my D1 mini (esp8266) by grabbing the SHT20 stuff from @koan’s library mentioned here, specifically:
libraries:
- "Wire"
- "uFire SHT20"
- "ArduinoJson"
includes:
- include/sht20.h
When building I get this error though (and yeah, I copied the header file and it’s being used):
Compiling /data/deepfreeze/.pioenvs/deepfreeze/lib1ec/uFire SHT20/uFire_SHT20_JSON.cpp.o
/data/deepfreeze/.piolibdeps/deepfreeze/uFire SHT20/src/uFire_SHT20_JSON.cpp:1:18: error: missing binary operator before token "("
#if __has_include("ArduinoJson.h")
^
*** [/data/deepfreeze/.pioenvs/deepfreeze/lib1ec/uFire SHT20/uFire_SHT20_JSON.cpp.o] Error 1
I haven’t done any CPP in over 20 years, and just barely then and have no idea what this error even means for me to attempt to fix myself and google wasn’t helping me out - likely I just couldn’t google right on this. Is anyone able to provide some more information on what this error means so I can hopefully resolve it?
Thanks,
jl