NO OUTPUT for a proposed project

#define DHTPIN 8
#define DHTTYPE DHT11
LiquidCrystal lcd(7,6,5,4,3,2);
float t=0;
const int ledPin = 11;
long interval=2000;
const int motorPin=9;
void setup() {
lcd.begin(16,2);// put your setup code here, to run once:
pinMode(ledPin, OUTPUT);
void loop()
{ start: // put your main code here, to run repeatedly
t = dht.readTemperature();
if((t>=35) && (t<=38))
goto start; }
else if((t<35) || (t>38))
{ lcd.clear();
lcd.print("Please Try Again");
goto start;}
void door()

I made this program for this arrangement
but when i upload it to the Arudino Uno R3
i get a blank display on LCD

Read the forum guidelines to see how to properly post code.
Use the IDE autoformat tool (ctrl-t or Tools, Auto format) before posting code in code tags.

Adjust the contrast setting.
I see that you have nothing wired to the contrast pin (LCD pin 3, Vo). The correct way to wire the contrast pot is to wire one end of the pot to ground and the wiper to pin 3. The other end of the pot not connected or connected to the wiper. The long standing advice that the pot is wired to ground, Vcc and pin 3 is wrong. It is an error perpetuated over many years that begs correction.

Or wire LCD pin 3 to ground through a fixed resistor. I found that 1K usually gives me good contrast, but you may need lesser values for your setup.

Edit: removed reference to I2C library. OOPS.


You posted text, not code.
Use the autoformat in the IDE and code tags, the </> symbol, here and paste. Numerous of errors are easily found this way.

Your schematic doesn't show anything connected to pin 11.


Yes i removed led later

Such a shame.
Simple output devices like LEDs make great debug devices.

Read about what the loop() function does.

I tried your code with my Uno and a 16x2 LCD. I did not connect a DHT11. The LCD displays Tempetraturnan* on the top row so the display part of the code works. If you see nothing, not even boxes, most likely the contrast is not set right.

*nan because no DHT connected.

how to set it right then

Are you going to try setting the contrast? If the contrast is right you should, at least, see blocks on the top row of the LCD.

If that is in reference to the contrast, see reply #2.

If you still have trouble, post a clear photo showing your wiring.

ok i got that , My contrast was not set .
I got the output finally displayed.
and for the pot (i searched it on YouTube and connected it like that)
Thanks for correction.

12volt through the motor (when off) and a 270 ohm resistor to pin10 can't be good.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.