#include <LiquidCrystal_I2C.h>
#include <dht.h>
#include <SoftwareSerial.h>
#define DHT22_PIN PB4
#define SERIAL_TX PB3
#define SERIAL_RX PB0
SoftwareSerial mySerial(SERIAL_RX, SERIAL_TX);
LiquidCrystal_I2C lcd(0x27, 16, 2); // set the LCD address to 0x27 for a 16 chars and 2 line display
dht DHT;
void setup(){
mySerial.begin(9600);
lcd.init();
lcd.backlight();
}
uint32_t t;
void loop(){
DHT.read22(DHT22_PIN);
lcd.setCursor(0,0);
lcd.print(DHT.temperature);
if(millis()-t>=1000){
mySerial.println(DHT.temperature);
t+=1000;
}
}