예제 #1
0
파일: temperature.py 프로젝트: xtile/sensor
from sensor.DS18B20 import DS18B20

ds = DS18B20('28-00000736781c')

print(ds.temperature().C)
예제 #2
0
def get_DS18B20_temp():
    ds = DS18B20('28-041592661eff')
    t = ds.temperature()  # read temperature
    return str(t.C)