Could someone please tell me what to put into this code to fix the errors? i have no knowledge or programming terms or anything, and i can't figure out what a primary expression is.
#include <LiquidCrystal.h>
#include <dht.h>
#include <LiquidCrystal.h>
// include the library code:
#include <LiquidCrystal.h>
#include "DHT.h"
// set the DHT Pin
#define DHTPIN8
// 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);
}
/code]
Arduino: 1.6.11 (Mac OS X), Board: "Arduino/Genuino Uno"
/Users/shelbyreid/Downloads/sketch_aug26b/sketch_aug26b.ino: In function 'void loop()':
sketch_aug26b:33: error: expected primary-expression before '.' token
float h = dht.readHumidity();
^
sketch_aug26b:35: error: expected primary-expression before '.' token
float f = dht.readTemperature(true);
^
exit status 1
expected primary-expression before '.' token
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.