HELP

I have wrote some code and I can not figure out what is going on. I would appreciate it very much if somebody could help me. this is the code.

#include <dht.h>
#include <LiquidCrystal.h>


#define DHTPIN 13
#define DHTTYPE DHT11
DHT dht (DHTPIN,DHTTYPE);
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

void setup(){
Serial.begin(9600);
Serial.println("reading sensor");
lcd.begin(16, 2);
lcd.setCursor(0,0);
lcd.print("Reading Sensor");
lcd.setCursor(0,2);
lcd.print("please wait...");
delay(2000);
lcd.clear();
dht. begin();
}


void loop(){
 delay(2000); \\wait few sconds between measurements.
 
float h = dht.readHumidity(); \\* Reading temperature or Humidity
float t = dht.readTemperature(); \\* Reading temperature
float f = dht.readTemperature(true); \\*reading temperature in fahrenheit
}
if (isnan(h) || isnan(t) || isnan(f)) {
 Serial.println("failed to read from dht sensor");
 return;
}
float hi = dht.computeHeatIdex(f,h);{
}
   lcd.setCursor(0,0);
   lcd.print("Temp.: ");
   lcd.print("t");
   lcd.print("C");
   lcd.setCursor(0,2);
   lcd.print("Humidity:");
   lcd.print("h");
   lcd.print("%\t");


   Serial.print("Humidity");
   Serial.print("h");
   Serial.print(" %\t");
   Serial.print("Temperature:");
   Serial.print("t");
   Serial.print(" *f ");  
       

}

Very few of us have your hardware to test with. Please tell us what problem you are having.

You have a 2 line LCD. The lines are 0 and 1. You have lcd.setCursor(0,2) in setup and elsewhere. Do you see a problem?

I can't see *any* code... ?!

The error I get is on line 23. I have a 2/16 lcd.and I am have built a pcb and going to mount a 328p on it. I am also using a dht11' Is that enough information for you guys help me.
Lou

kjn4685:
I have a 2/16 lcd

Yes but as groundfungus pointed out, those 2x lines are numbered 0 and 1; there is no line numbered 2.

kjn4685:
The error I get is on line 23. …Is that enough information

No… you don’t say what the error is.

edit… Go back to the first post and modify it, then select the code and hit the </> icon so the sketch appears in a nice box

like this

While you’re at it, point to line 23 so we don’t have to count and maybe miscount to the wrong line, and post the error message in full.

And while you are still here, please read this:How to use this forum

Also, line 23 doesn't seem to be possible to be able to contain an error:

But you know what the issue is...you don't know how to comment in your code...try "//" instead of "\"

I can not figure out what is going on

I can't figure out what the problem is. Your subject line of "HELP" is not particularly informative.

(deleted)

(deleted)

Please get rid of those backslashes, all of you.

I appreciate all that you guys have done for me. I have figured out the problems that I was having with my code. I will post the new code when I get to my computer. I am on my tablet right now. Thanks again.
Lou