Help with uploading

hi,

is there someone that can help me?
i have a problem with uploading my sketch, it give arror

here is the error:

C:\Users\nickv\OneDrive\Documenten\Arduino\libraries\libraries\DHT_sensor_library/DHT_U.h:25:29: fatal error: Adafruit_Sensor.h: No such file or directory

and here is my sketch:

#include <DHT.h>
#include <DHT_U.h>

#include <LiquidCrystal.h>

#define DHTPIN 5
LiquidCrystal lcd(7, 8, 9, 10, 11, 12);
#define DHTTYPE DHT11
DHT dht(DHTPIN, DHTTYPE);
void setup() {
// put your setup code here, to run once:
dht.begin();
lcd.begin(16, 2);
}

void loop() {
// put your main code here, to run repeatedly:
float h = dht.readHumidity();
float t = dht.readTemperature();
if (isnan(t) || isnan(h)) {
lcd.setCursor(0, 0);
lcd.print(“Failed to read from DHT”);
}
else{
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Humidity: “);
lcd.print(h);
lcd.print(” ");
lcd.setCursor(0, 1);
lcd.print("Temp: “);
lcd.print(t);
lcd.print(” ");
}
}

i try everything i can but it seems that i cant find the file from my library
but if i see it says that the DHT is installed.

someone that have this problem or now the reason for that?

thanks,

nick

When you see a "No such file or directory" error it almost always means you need to install the library that contains the missing file.

Often the code you're compiling will come with documentation (either a comment or separate document) that tells you where to get the library dependencies.

In other cases the author of the code will not have been so kind and you'll need to go on a hunt for the missing library.

A good place to start is the Arduino IDE's Library Manager:

  • Sketch > Include Library > Manage Libraries...
  • In the "Filter your search..." box, type some keywords you have gleaned from the missing file name.
  • Scroll through the results for the right library. Click on it.
  • Click "Install".
  • Wait for installation to finish.
  • Click "Close".
  • Try compiling your code again.

If you have no luck in Library Manager then load up your favorite search engine and do a search for the missing filename. You will often get multiple results. If you have a lot of results you might add "arduino" as an additional search keyword. I will usually prefer results on github.com since that is where most Arduino libraries are hosted and downloading from there is fast and easy. In some cases there will be multiple libraries that contain the given filename and you'll need to do some evaluation to determine which seems the most appropriate, then try it out. After downloading the library you found you'll need to install it. This requires a different process than the Library Manager installation. You will find instructions here:

Window 10 has a Microsoft app version go to your app store and delete it and save your sketch then download the 1.8.8 version from the https://arduino.cc web after done see if you can find a library on github that will compile that has the same #include as your sketch then try and load your sketch again

Installing the Windows App isn't going to do anything other than waste time.

Just install the Adafruit Unified Sensor library and everything is good.

Thanks everyone,

It's working perfect now.

I just have to install the library from github.com,
i just start last week with arduino and this was my first sketch with the use of the library.

thanks

You're welcome. I'm glad to hear it's working now. Enjoy!
Per