液体温度传感器
python 编程:
创建实例
temperature(port_num)
创建temperature实例,port_num 可取值为thunbot.PORT_1
,thunbot.PORT_2
,thunbot.PORT_3
,thunbot.PORT_4
,thunbot.PORT_A
,thunbot.PORT_B
。
方法
get_temperature()
获取温度值。
编程示范
import thunbot
import time
t1 = thunbot.temperature(thunbot.PORT_3)
while True:
print(t1.get_temperature())
time.sleep(1)