Exit Status 1, error compiling for board Arduino/Genuino UNO

Hello! I’m using LCD 1206A and DHT22 with arrangement that of the picture attached. The screen works well but doesn’t display anything. The problem seems to be in the code as upon input (Exit Status 1, error compiling for board Arduino/Genuino UNO).

#include <DHT.h>
#include <LiquidCrystal.h>

// Pin connected to the sensor data pin
#define DHTPIN 7

// Display pins
LiquidCrystal LCD (12, 11, 5, 4, 3, 2);

// Use the line according to the sensor model
// #define DHTTYPE DHT11 // Sensor DHT11
#define DHTTYPE DHT22 DHT Sensor 22 (AM2302)
// #define DHTTYPE DHT21 // DHT Sensor 21 (AM2301)

// Definitions sensor: pin, type
DHT DHT (DHTPIN, DHTTYPE);

// Array symbol degree
byte level [8] = {B00001100,
B00010010,
B00010010,
B00001100,
B00000000,
B00000000,
B00000000,
B00000000,
};

void setup ()
{
// Initialize the display
lcd.begin (16, 2);
lcd.clear ();
// Create the custom character with the symbol of the degree
lcd.createChar (0, degree);
// Information on the initial display
lcd.setCursor (0, 0);
lcd.print ("Temp. : ");
lcd.setCursor (13.0);
// Shows the symbol of the degree
lcd.write (byte (0));
lcd.print ("C");
lcd.setCursor (0.1);
lcd.print ("Humid. : ");
lcd.setCursor (14.1);
lcd.print ("%");

Serial.begin (9600);
Serial.println ("Waiting for data ...");
// Starts DHT sensor
dht.begin ();
}

void loop ()
{
// Wait 2 seconds between the measurements
delay (2000);

// Moisture reading
dht.readHumidity float h = ();
// Reading of temperature (Celsius)
t = dht.readTemperature float ();

// Check if the sensor is responding
if (isnan (h) || isnan (t))
{
Serial.println ("Failed to read DHT sensor data !!!");
return;
}

// Display the temperature in the serial monitor and display
Serial.print ("Temperature: ");
Serial.print (t);
lcd.setCursor (8.0);
lcd.print (t);
Serial.print (" C * ");
// Show the moisture in the serial monitor and display
Serial.print ("humidity: ");
Serial.print (h);
Serial.println (" %");
lcd.setCursor (8.1);
lcd.print (h);
}

Is there anything I miss?

Please use code tags (</> button on the toolbar) when you post code or warning/error messages. The reason is that the forum software can interpret parts of your code as markup, leading to confusion, wasted time, and a reduced chance for you to get help with your problem. This will also make it easier to read your code and to copy it to the IDE or editor. If your browser doesn’t show the posting toolbar then you can just manually add the code tags:
[code]``[color=blue]// your code is here[/color]``[/code]
Using code tags and other important information is explained in the How to use this forum post. Please read it.

Please always do a Tools > Auto Format on your code before posting it. This will make it easier for you to spot bugs and make it easier for us to read. If you’re using the Arduino Web Editor you will not have access to this useful tool but it’s still unacceptable to post poorly formatted code. I recommend you to use the standard IDE instead.

When you encounter an error you’ll see a button on the right side of the orange bar “Copy error messages”. Click that button. Paste the error in a message here USING CODE TAGS (</> button on the toolbar).

Indeed, we need the full error output.

"Exit status 1" is non-specific - its the last line of the output for any compile error. If you scroll up, youll see the error that led to that.

// Definitions sensor: pin, type
DHT DHT (DHTPIN, DHTTYPE);

You should NOT name the instance the same as the class.

PaulS:

// Definitions sensor: pin, type

DHT DHT (DHTPIN, DHTTYPE);



You should NOT name the instance the same as the class.

Thank you for pointing it out! Also, the problem seems to lie in the file directory. However, I'm not really sure how to handle it.

//C:\Users\Lenovo\Documents\Arduino\Probes_Arduino_LCD_1206A_DHT22\Probes_Arduino_LCD_1206A_DHT22.ino:1:17: fatal error: DHT.h: No such file or directory