from machine import Pin, SoftI2C
from utime import sleep, sleep_ms
from ssd1306 import SSD1306_I2C
from dht import DHT22
weather = DHT22(Pin(12))
i2c=SoftI2C(sda=Pin(22),scl=Pin(23))
display=SSD1306_I2C(128,64,i2c)
b=1
display.fill(1)
while True:
weather.measure()
temp=weather.temperature()
dry=weather.humidity()
display.text(f'Temperature:',2,2,0)
display.text(str(temp)+'C',2,12,0)
display.text(f'Dry: ',2,30,0)
display.text(str(dry)+'%',2,42,0)
display.show()