from machine import Pin, SoftI2C
from utime import sleep, sleep_ms
from ssd1306 import SSD1306_I2C
from dht import DHT22
weather = DHT22(Pin(12))
while True:
weather.measure()
temp=weather.temperature()
hum=weather.humidity()
print(f'Temperature: {temp}C\nHumidity: {hum}%')
sleep(1)
i2c=SoftI2C(sda=Pin(22),scl=Pin(23))
display=SSD1306_I2C(128,64,i2c)