from sensor.DS18B20 import DS18B20 ds = DS18B20('28-00000736781c') print(ds.temperature().C)
def get_DS18B20_temp(): ds = DS18B20('28-041592661eff') t = ds.temperature() # read temperature return str(t.C)