so i am attempting to have my DHT11 humidity/ temperature sensor module display what it is sensing onto a 74HC595 LCD display. the issue i am having is with the code. i keep getting a "error compiling for board arduino/ genuino uno". i have tried the code with both the "SimpleDHT" and the "DHT sensor" libraries with the same error each time. i will attach the code followed buy the error i am getting.
( P.S. i did read the forum on how to post codes and errors, this is my first time doing so so bare with me if i don't do it correctly).
// include the library code:
#include <LiquidCrystal.h>
#include "DHT.h"
// set the DHT Pin
#define DHTPIN 8
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
#define DHTTYPE DHT11
DHT dht(DHTPIN, DHTTYPE);
void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
dht.begin();
// Print a message to the LCD.
lcd.print("Temp: Humidity:");
}
void loop() {
delay(500);
// set the cursor to column 0, line 1
// (note: line 1 is the second row, since counting begins with 0):
lcd.setCursor(0, 1);
// read humidity
float h = dht.readHumidity();
//read temperature in Fahrenheit
float f = dht.readTemperature(true);
if (isnan(h) || isnan(f)) {
lcd.print("ERROR");
return;
}
lcd.print(f);
lcd.setCursor(7,1);
lcd.print(h);
}
/////////THESE ARE THE FOLLOWING ERRORS I GET.......\\\\\
Arduino: 1.8.1 (Windows 10), Board: "Arduino/Genuino Uno"
Build options changed, rebuilding all
C:\Users\cenright\Downloads\LCD_DHT11\LCD_DHT11.ino:2:29: fatal error: Adafruit_Sensor.h: No such file or directory
#include <Adafruit_Sensor.h>
^
compilation terminated.
exit status 1
Error compiling for board Arduino/Genuino Uno.
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.