I currently have a arduino uno connect to a dht11 running on a lcd screen.
I was able to get some of the programming done by reading the forms. I am trying to convert from Celsius to Fahrenheit with the code I have copied.
the code is a follows
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#include <dht.h>
LiquidCrystal_I2C lcd(0x3F, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);
#define dht_dpin A0 //no ; here. Set equal to channel sensor is on
dht DHT;
void setup(){
lcd.begin(20,4);
Serial.begin(9600);
delay(300);//Let system settle
}
void loop(){
DHT.read11(dht_dpin);
Serial.print(“Current Temperature = “);
Serial.print(DHT.temperature);
Serial.println(” C”);
lcd.setCursor(0,0);
lcd.print(“Temp = “);
lcd.print(DHT.temperature);
lcd.print(” C”);
Serial.print(“Current Humidity = “);
Serial.print(DHT.humidity);
Serial.println(” %”);
lcd.setCursor(0,1);
lcd.print(“RH = “);
lcd.print(DHT.humidity);
lcd.print(” %”);
double gamma = log(DHT.humidity / 100) + ((17.62 * DHT.temperature) / (243.5 + DHT.temperature));
double dp = 243.5 * gamma / (17.62 - gamma);
Serial.print(“Dew point = “);
Serial.print(dp);
Serial.print(” C”);
Serial.println();
Serial.println();
lcd.setCursor(0,2);
lcd.print(“DT = “);
lcd.print(dp);
lcd.print(” C”);
delay(1600);
}
someone willing to tell me how keep both C and F on the display?
Thanks
Mike