Arduino: 1.8.0 (Windows 10), Board: “ESP32 Dev Module, Disabled, Default, 240MHz (WiFi/BT), QIO, 80MHz, 4MB (32Mb), 115200, None”
C:\Users\joel\Documents\Arduino\sketch_mar26a\sketch_mar26a.ino:3:17: fatal error: DHT.h: No such file or directory
compilation terminated.
Multiple libraries were found for “WiFi.h”
Used: C:\Users\joel\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.1\libraries\WiFi
Not used: C:\Program Files (x86)\Arduino\libraries\WiFi
exit status 1
Error compiling for board ESP32 Dev Module.
This report would have more information with
“Show verbose output during compilation”
option enabled in File -> Preferences.
Hello Joel, it looks like you forgot to install the DHT library. Can you install it and try to compile the code again?
I also recommend installing the Adafruit_Sensor library.
Installing the DHT library
To read from the DHT sensor, you must have the DHT library installed. If you don’t have the DHT library installed, follow the instructions below:
- Click here to download the DHT-sensor-library. You should have a .zip folder in your Downloads folder
- Unzip the .zip folder and you should get DHT-sensor-library-master folder
- Rename your folder from DHT-sensor-library-master to DHT
- Move the DHT folder to your Arduino IDE installation libraries folder
- Finally, re-open your Arduino IDE
Installing the Adafruit_Sensor library
To use the DHT temperature and humidity sensor, you also need to install the Adafruit_Sensor library. Follow the next steps to install the library in your Arduino IDE:
- Click here to download the Adafruit_Sensor library. You should have a .zip folder in your Downloads folder
- Unzip the .zip folder and you should get Adafruit_Sensor-master folder
- Rename your folder from Adafruit_Sensor-master to Adafruit_Sensor
- Move the Adafruit_Sensor folder to your Arduino IDE installation libraries folder
- Finally, re-open your Arduino IDE