-
Notifications
You must be signed in to change notification settings - Fork 42
CPP: DHT11
Leo Vidarte edited this page Mar 7, 2017
·
4 revisions
We need the following libraries
Libs installation
$ platformio lib install \
https://github.com/adafruit/DHT-sensor-library.git
$ platformio lib install \
https://github.com/adafruit/Adafruit_Sensor.git
Then checkout this PlatformIO project code here and compile.
But... error on compiling
In file included from .piolibdeps/DHT-sensor-library/DHT_U.cpp:22:0:
.piolibdeps/DHT-sensor-library/DHT_U.h:25:29: fatal error: Adafruit_Sensor.h: No such file or directory
#include <Adafruit_Sensor.h>
^
compilation terminated.
There is a known issue with Adafruit libraries. The workaround solution is to add the following line to the platformio.ini
lib_ldf_mode = 2
Then compile and open the serial monitor
ESP8266 NodeMCU Workshop - 2017