from machine import Pin,SoftI2C,Timer
from ssd1306 import SSD1306 I2C
import onewire,ds18x2e,time

i2c = SoftI2C(sda=Pin(14), scl=Pin(12))
from ssd1306 import SSD1306 I2C
oled = SSD1306_I2C(128,64,i2c,addr=0x3c)

ow = onewire.OneWire(Pin(4))
ds = ds12x20.DS18x20(ow)
rom = ds.scan()
led_r=Pin(23,Pin.OUT)
led_b=Pin(22,Pin.OUT)
led_g=Pin(21,Pin.OUT)
ds.convert_temp()
def temp_get(tim)
    temp = ds.read_temp(rom[0])
    oled.fill(0)
    oled.text(str('%2f'%temp),0,40)
    oled.show()
    if teep > 30:
        led_r.value(1)
        led_g.value(0)
        led_b.value(0)
    else:
        led_r.value(0)
        led_g.value(0)
        led_b.value(1)
tim = Timer(1)
tim.lmit(perlod = 1000, )