It doesn’t run libraries. Error in library paths. “.pio\libdeps\esp32dev\DHT sensor library\DHT_U.h:36:29: fatal error: Adafruit_Sensor.h: No such file or directory” I couldn’t find a solution. Any help?
pio\libdeps\esp32dev\DHT sensor library\DHT_U.h:36:29: fatal error: Adafruit_Sensor.h: No such file or directory
Maybe with more context you could get help for instance by giving your platformio.ini and how/where have you installed your libraries ?
You can install the lib by using in the CLI command : pio lib
For instance for adafruit sensor lib : pio lib -g install 31
In this case, 31 is the ID number of the lib Adafruit unified sensor
The DHT library doesn’t work smoothly with PlatformIO. See other threads in this forum (e.g. Library dependency problem related to Core 5.0?).
The solution is simple. Add the following include statements to
#include <Adafruit_Sensor.h> #include <DHT.h>
I am getting an error even though I added it.
Again, please show the full
platformio.ini and code that you’re using.
The linking error is unrelated to the sensor code. It says there is no implementation of the
same code and link Arduino IDE not giving error
I am uploading sample code of DHT11 library. DHT-sensor-library/DHTtester.ino at master · adafruit/DHT-sensor-library · GitHub
The code you show in the screenshot is very different from that. You have the
DHT.cpp file saved as
main.cpp there, not the
I’m getting the same error with all these libraries. I tried adding a different library and still got the same error.