Code can't be compiled

exit status 1

Compilation error: macro names must be identifiers

#include <Servo.h>

#include <Wire.h>

#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x27,20,4); // set the LCD address to 0x27 for a 16 chars and 2 line display

#define <DHT.h>

int DHT;

#define DHT11_PIN 2

int p1 = 13;//PIR 1

int p2 = 12;//PIR 2

int buz = 11;//BUZZER

Servo s1;

Servo s2;

Servo s3;

int pos = 0;

const int pingPin = 7;

const int echoPin = 6;

// Variables for the duration and the distance

That code has no setup() or loop() functions so is not a legal Arduino sketch. Those functions are required, even if they are empty.

PLEASE
Read the forum guidelines to see how to properly post code and some good information on making a good post.
Use the IDE autoformat tool (ctrl-t or Tools, Auto format) before posting code in code tags.

Please include the entire error message. It is easy to do. There is a button (lower right of the IDE window) called "copy error message". Copy the error and paste into a post in code tags. Paraphrasing the error message leaves out important information.

#define <DHT.h>

Shouldn't this be

#include <DHT.h>
1 Like

i changed it and did #include now it says no such file or directory

Please include the entire error message. It is easy to do. There is a button (lower right of the IDE window) called "copy error message". Copy the error and paste into a post in code tags. Paraphrasing the error message leaves out important information.

That sounds like you don't have the DHT library installed. You can install it using the library manager.

i just installed it, now it says Compilation error: exit status 1

okay

Using board 'uno' from platform in folder: C:\Users\Acer\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.5
Using core 'arduino' from platform in folder: C:\Users\Acer\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.5
Detecting libraries used...
"C:\\Users\\Acer\\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=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\Acer\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\cores\\arduino" "-IC:\\Users\\Acer\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\variants\\standard" "C:\\Users\\Acer\\AppData\\Local\\Temp\\arduino-sketch-325D247DCE049A2880B5186086367D83\\sketch\\Design project.ino.cpp" -o nul
Alternatives for Servo.h: [Servo@1.1.8]
ResolveLibrary(Servo.h)
  -> candidates: [Servo@1.1.8]
"C:\\Users\\Acer\\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=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\Acer\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\cores\\arduino" "-IC:\\Users\\Acer\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\variants\\standard" "-IC:\\Users\\Acer\\AppData\\Local\\Arduino15\\libraries\\Servo\\src" "C:\\Users\\Acer\\AppData\\Local\\Temp\\arduino-sketch-325D247DCE049A2880B5186086367D83\\sketch\\Design project.ino.cpp" -o nul
Alternatives for Wire.h: [Wire@1.0]
ResolveLibrary(Wire.h)
  -> candidates: [Wire@1.0]
"C:\\Users\\Acer\\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=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\Acer\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\cores\\arduino" "-IC:\\Users\\Acer\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\variants\\standard" "-IC:\\Users\\Acer\\AppData\\Local\\Arduino15\\libraries\\Servo\\src" "-IC:\\Users\\Acer\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\libraries\\Wire\\src" "C:\\Users\\Acer\\AppData\\Local\\Temp\\arduino-sketch-325D247DCE049A2880B5186086367D83\\sketch\\Design project.ino.cpp" -o nul
Alternatives for LiquidCrystal_I2C.h: [Arduino-LiquidCrystal-I2C-library-master LiquidCrystal_I2C-1.1.2@1.1.2]
ResolveLibrary(LiquidCrystal_I2C.h)
  -> candidates: [Arduino-LiquidCrystal-I2C-library-master LiquidCrystal_I2C-1.1.2@1.1.2]
"C:\\Users\\Acer\\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=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\Acer\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\cores\\arduino" "-IC:\\Users\\Acer\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\variants\\standard" "-IC:\\Users\\Acer\\AppData\\Local\\Arduino15\\libraries\\Servo\\src" "-IC:\\Users\\Acer\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\libraries\\Wire\\src" "-Ic:\\Users\\Acer\\Downloads\\libraries\\LiquidCrystal_I2C-1.1.2" "C:\\Users\\Acer\\AppData\\Local\\Temp\\arduino-sketch-325D247DCE049A2880B5186086367D83\\sketch\\Design project.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\\Acer\\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=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\Acer\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\cores\\arduino" "-IC:\\Users\\Acer\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\variants\\standard" "-IC:\\Users\\Acer\\AppData\\Local\\Arduino15\\libraries\\Servo\\src" "-IC:\\Users\\Acer\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\libraries\\Wire\\src" "-Ic:\\Users\\Acer\\Downloads\\libraries\\LiquidCrystal_I2C-1.1.2" "-Ic:\\Users\\Acer\\Downloads\\libraries\\DHT_sensor_library" "C:\\Users\\Acer\\AppData\\Local\\Temp\\arduino-sketch-325D247DCE049A2880B5186086367D83\\sketch\\Design project.ino.cpp" -o nul
"C:\\Users\\Acer\\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=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\Acer\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\cores\\arduino" "-IC:\\Users\\Acer\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\variants\\standard" "-IC:\\Users\\Acer\\AppData\\Local\\Arduino15\\libraries\\Servo\\src" "-IC:\\Users\\Acer\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\libraries\\Wire\\src" "-Ic:\\Users\\Acer\\Downloads\\libraries\\LiquidCrystal_I2C-1.1.2" "-Ic:\\Users\\Acer\\Downloads\\libraries\\DHT_sensor_library" "C:\\Users\\Acer\\AppData\\Local\\Arduino15\\libraries\\Servo\\src\\avr\\Servo.cpp" -o nul
"C:\\Users\\Acer\\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=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\Acer\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\cores\\arduino" "-IC:\\Users\\Acer\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\variants\\standard" "-IC:\\Users\\Acer\\AppData\\Local\\Arduino15\\libraries\\Servo\\src" "-IC:\\Users\\Acer\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\libraries\\Wire\\src" "-Ic:\\Users\\Acer\\Downloads\\libraries\\LiquidCrystal_I2C-1.1.2" "-Ic:\\Users\\Acer\\Downloads\\libraries\\DHT_sensor_library" "C:\\Users\\Acer\\AppData\\Local\\Arduino15\\libraries\\Servo\\src\\mbed\\Servo.cpp" -o nul
"C:\\Users\\Acer\\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=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\Acer\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\cores\\arduino" "-IC:\\Users\\Acer\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\variants\\standard" "-IC:\\Users\\Acer\\AppData\\Local\\Arduino15\\libraries\\Servo\\src" "-IC:\\Users\\Acer\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\libraries\\Wire\\src" "-Ic:\\Users\\Acer\\Downloads\\libraries\\LiquidCrystal_I2C-1.1.2" "-Ic:\\Users\\Acer\\Downloads\\libraries\\DHT_sensor_library" "C:\\Users\\Acer\\AppData\\Local\\Arduino15\\libraries\\Servo\\src\\megaavr\\Servo.cpp" -o nul
"C:\\Users\\Acer\\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=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\Acer\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\cores\\arduino" "-IC:\\Users\\Acer\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\variants\\standard" "-IC:\\Users\\Acer\\AppData\\Local\\Arduino15\\libraries\\Servo\\src" "-IC:\\Users\\Acer\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\libraries\\Wire\\src" "-Ic:\\Users\\Acer\\Downloads\\libraries\\LiquidCrystal_I2C-1.1.2" "-Ic:\\Users\\Acer\\Downloads\\libraries\\DHT_sensor_library" "C:\\Users\\Acer\\AppData\\Local\\Arduino15\\libraries\\Servo\\src\\nrf52\\Servo.cpp" -o nul
"C:\\Users\\Acer\\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=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\Acer\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\cores\\arduino" "-IC:\\Users\\Acer\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\variants\\standard" "-IC:\\Users\\Acer\\AppData\\Local\\Arduino15\\libraries\\Servo\\src" "-IC:\\Users\\Acer\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\libraries\\Wire\\src" "-Ic:\\Users\\Acer\\Downloads\\libraries\\LiquidCrystal_I2C-1.1.2" "-Ic:\\Users\\Acer\\Downloads\\libraries\\DHT_sensor_library" "C:\\Users\\Acer\\AppData\\Local\\Arduino15\\libraries\\Servo\\src\\sam\\Servo.cpp" -o nul
"C:\\Users\\Acer\\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=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\Acer\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\cores\\arduino" "-IC:\\Users\\Acer\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\variants\\standard" "-IC:\\Users\\Acer\\AppData\\Local\\Arduino15\\libraries\\Servo\\src" "-IC:\\Users\\Acer\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\libraries\\Wire\\src" "-Ic:\\Users\\Acer\\Downloads\\libraries\\LiquidCrystal_I2C-1.1.2" "-Ic:\\Users\\Acer\\Downloads\\libraries\\DHT_sensor_library" "C:\\Users\\Acer\\AppData\\Local\\Arduino15\\libraries\\Servo\\src\\samd\\Servo.cpp" -o nul
"C:\\Users\\Acer\\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=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\Acer\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\cores\\arduino" "-IC:\\Users\\Acer\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\variants\\standard" "-IC:\\Users\\Acer\\AppData\\Local\\Arduino15\\libraries\\Servo\\src" "-IC:\\Users\\Acer\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\libraries\\Wire\\src" "-Ic:\\Users\\Acer\\Downloads\\libraries\\LiquidCrystal_I2C-1.1.2" "-Ic:\\Users\\Acer\\Downloads\\libraries\\DHT_sensor_library" "C:\\Users\\Acer\\AppData\\Local\\Arduino15\\libraries\\Servo\\src\\stm32f4\\Servo.cpp" -o nul
"C:\\Users\\Acer\\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=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\Acer\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\cores\\arduino" "-IC:\\Users\\Acer\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\variants\\standard" "-IC:\\Users\\Acer\\AppData\\Local\\Arduino15\\libraries\\Servo\\src" "-IC:\\Users\\Acer\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\libraries\\Wire\\src" "-Ic:\\Users\\Acer\\Downloads\\libraries\\LiquidCrystal_I2C-1.1.2" "-Ic:\\Users\\Acer\\Downloads\\libraries\\DHT_sensor_library" "C:\\Users\\Acer\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\libraries\\Wire\\src\\Wire.cpp" -o nul
"C:\\Users\\Acer\\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=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\Acer\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\cores\\arduino" "-IC:\\Users\\Acer\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\variants\\standard" "-IC:\\Users\\Acer\\AppData\\Local\\Arduino15\\libraries\\Servo\\src" "-IC:\\Users\\Acer\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\libraries\\Wire\\src" "-Ic:\\Users\\Acer\\Downloads\\libraries\\LiquidCrystal_I2C-1.1.2" "-Ic:\\Users\\Acer\\Downloads\\libraries\\DHT_sensor_library" "C:\\Users\\Acer\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\libraries\\Wire\\src\\utility\\twi.c" -o nul
"C:\\Users\\Acer\\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=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\Acer\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\cores\\arduino" "-IC:\\Users\\Acer\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\variants\\standard" "-IC:\\Users\\Acer\\AppData\\Local\\Arduino15\\libraries\\Servo\\src" "-IC:\\Users\\Acer\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\libraries\\Wire\\src" "-Ic:\\Users\\Acer\\Downloads\\libraries\\LiquidCrystal_I2C-1.1.2" "-Ic:\\Users\\Acer\\Downloads\\libraries\\DHT_sensor_library" "c:\\Users\\Acer\\Downloads\\libraries\\LiquidCrystal_I2C-1.1.2\\LiquidCrystal_I2C.cpp" -o nul
"C:\\Users\\Acer\\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=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\Acer\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\cores\\arduino" "-IC:\\Users\\Acer\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\variants\\standard" "-IC:\\Users\\Acer\\AppData\\Local\\Arduino15\\libraries\\Servo\\src" "-IC:\\Users\\Acer\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\libraries\\Wire\\src" "-Ic:\\Users\\Acer\\Downloads\\libraries\\LiquidCrystal_I2C-1.1.2" "-Ic:\\Users\\Acer\\Downloads\\libraries\\DHT_sensor_library" "c:\\Users\\Acer\\Downloads\\libraries\\DHT_sensor_library\\DHT.cpp" -o nul
"C:\\Users\\Acer\\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=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\Acer\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\cores\\arduino" "-IC:\\Users\\Acer\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\variants\\standard" "-IC:\\Users\\Acer\\AppData\\Local\\Arduino15\\libraries\\Servo\\src" "-IC:\\Users\\Acer\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\libraries\\Wire\\src" "-Ic:\\Users\\Acer\\Downloads\\libraries\\LiquidCrystal_I2C-1.1.2" "-Ic:\\Users\\Acer\\Downloads\\libraries\\DHT_sensor_library" "c:\\Users\\Acer\\Downloads\\libraries\\DHT_sensor_library\\DHT_U.cpp" -o nul
Alternatives for Adafruit_Sensor.h: []
ResolveLibrary(Adafruit_Sensor.h)
  -> candidates: []
In file included from c:\Users\Acer\Downloads\libraries\DHT_sensor_library\DHT_U.cpp:15:0:
c:\Users\Acer\Downloads\libraries\DHT_sensor_library\DHT_U.h:36:10: fatal error: Adafruit_Sensor.h: No such file or directory
 #include <Adafruit_Sensor.h>
          ^~~~~~~~~~~~~~~~~~~
compilation terminated.
Multiple libraries were found for "LiquidCrystal_I2C.h"
  Used: C:\Users\Acer\Downloads\libraries\LiquidCrystal_I2C-1.1.2
  Not used: C:\Users\Acer\Downloads\libraries\Arduino-LiquidCrystal-I2C-library-master
Using library Servo at version 1.1.8 in folder: C:\Users\Acer\AppData\Local\Arduino15\libraries\Servo 
Using library Wire at version 1.0 in folder: C:\Users\Acer\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.5\libraries\Wire 
Using library LiquidCrystal_I2C-1.1.2 at version 1.1.2 in folder: C:\Users\Acer\Downloads\libraries\LiquidCrystal_I2C-1.1.2 
Using library DHT_sensor_library at version 1.4.4 in folder: C:\Users\Acer\Downloads\libraries\DHT_sensor_library 
exit status 1

Compilation error: exit status 1

Look like you need to install the Adafruit_Sensor library.

i have downloaded it, the code was compiled successfully. thank you.

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