LCD updating data from DHT11


hi everybody, i'm doing final school project , can't understand how auto-updating result on lcd.
the code following:
code: [select]
#include <dht11.h>
dht11 dht;
#define dht11_pin 4
#include <wire.h>
#include <lcd.h>
#include <liquidcrystal_i2c.h>

liquidcrystal_i2c  lcd(0x3f, 2, 1, 0, 4, 5, 6, 7);
void setup()
{
  // activate lcd module
  lcd.begin (20, 4);
  lcd.setbacklightpin(3, positive);
  // lcd.setbacklight(low);
  //delay(1000);
  lcd.setbacklight(high);
  lcd.home();
  lcd.print("umidita'     temp");
}

void loop()
{
   lcd.setcursor(2, 2);
    int chk;
    chk = dht.read(dht11_pin);    // read data}
    // display data
    lcd.print(dht.humidity, 1);
    lcd.print("%      ");
    lcd.print(dht.temperature, 1);
    lcd.print(" gradi ");

 
}


anyone me ? i'd use delay don't know where

i have done sorry.
i hav


Arduino Forum > Using Arduino > Displays > LCD updating data from DHT11


arduino

Comments

Popular posts from this blog

Help needed for choosing soldering station

Error Message when accessing Adobe

Fuelino for Arduino Nano - motorcycle Fuel Injection control and data logger