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