Error compilling for board arduino mega

Using board 'mega' from platform in folder: C:\Users\USER\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6
Using core 'arduino' from platform in folder: C:\Users\USER\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6
Detecting libraries used...
"C:\Users\USER\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR "-IC:\Users\USER\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino" "-IC:\Users\USER\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\mega" "C:\Users\USER\AppData\Local\Temp\arduino-sketch-D0E359D76A4B8B7A0AD0C08BE30FF8A7\sketch\sketch_nov4a.ino.cpp" -o nul
Alternatives for DHT.h: [DHT sensor library@1.4.4]
ResolveLibrary(DHT.h)
-> candidates: [DHT sensor library@1.4.4]
"C:\Users\USER\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR "-IC:\Users\USER\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino" "-IC:\Users\USER\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\mega" "-IC:\Users\USER\Documents\Arduino\libraries\DHT_sensor_library-1.4.4" "C:\Users\USER\AppData\Local\Temp\arduino-sketch-D0E359D76A4B8B7A0AD0C08BE30FF8A7\sketch\sketch_nov4a.ino.cpp" -o nul
"C:\Users\USER\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR "-IC:\Users\USER\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino" "-IC:\Users\USER\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\mega" "-IC:\Users\USER\Documents\Arduino\libraries\DHT_sensor_library-1.4.4" "C:\Users\USER\Documents\Arduino\libraries\DHT_sensor_library-1.4.4\DHT.cpp" -o nul
"C:\Users\USER\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR "-IC:\Users\USER\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino" "-IC:\Users\USER\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\mega" "-IC:\Users\USER\Documents\Arduino\libraries\DHT_sensor_library-1.4.4" "C:\Users\USER\Documents\Arduino\libraries\DHT_sensor_library-1.4.4\DHT_U.cpp" -o nul
Alternatives for Adafruit_Sensor.h: []
ResolveLibrary(Adafruit_Sensor.h)
-> candidates: []
In file included from C:\Users\USER\Documents\Arduino\libraries\DHT_sensor_library-1.4.4\DHT_U.cpp:15:0:
C:\Users\USER\Documents\Arduino\libraries\DHT_sensor_library-1.4.4\DHT_U.h:36:10: fatal error: Adafruit_Sensor.h: No such file or directory
#include <Adafruit_Sensor.h>
^~~~~~~~~~~~~~~~~~~
compilation terminated.

Using library DHT sensor library at version 1.4.4 in folder: C:\Users\USER\Documents\Arduino\libraries\DHT_sensor_library-1.4.4
exit status 1

Compilation error: exit status 1

try using the library manager (click Sketch>Include Library>Manage Libraries) to instal Adafruit_Sensor

1 Like

Hi horace, thank you for your help. Appreciate it. It is working as it should now.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.