#include "I2C_LCD.h"
#include <DHT22.h>
//define pin data
#define pinDATA 18 // SDA, or almost any other I/O pin
DHT22 dht22(pinDATA);
I2C_LCD lcd(39);
void setup() {
// put your setup code here, to run once:
Serial1.begin(115200);
Serial1.println("Hello, Raspberry Pi Pico!");
Wire.begin();
lcd.begin(16, 2);
// display fixed text once
lcd.setCursor(0, 0);
lcd.print("T: ");
}
void loop() {
// put your main code here, to run repeatedly:
delay(100); // this speeds up the simulation
float t = dht22.getTemperature();
float h = dht22.getHumidity();
lcd.setCursor(8, 0);
lcd.print(t);
lcd.print("C");
lcd.setCursor(0, 1);
lcd.print("H: ");
lcd.setCursor(8, 1);
lcd.print(h);
lcd.print("%");
}