怎么把树莓派温度调高?
使用python获得温度 编写一个名为yeelink-temp.py的文件,文件具体内容如下: # -*- coding: utf-8 -*- # 打开文件 file = open("/sys/class/thermal/thermal_zone0/temp") # 读取结果,并转换为浮点数 temp = float(file.read()) / 1000 # 关闭文件 file.close() # 向控制台打印 print "temp : %.1f" %temp 在yeelink-temp.py目录下输入以下指令执行脚本 # 执行脚本 python yeelink-temp.py # 执行返回 temp :
Copyright © 广州京杭网络科技有限公司 2005-2025 版权所有 粤ICP备16019765号
广州京杭网络科技有限公司 版权所有