当前位置:首页 > 未命名 > 正文内容

pi

dsttl36年前 (2018-07-31)未命名124
import os
import time
import datetime
while True:
    print('当前时间:'+datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S'))
    print('当前CPU温度 : ' + os.popen('vcgencmd measure_temp').readline().replace("temp=","").replace("'C\n",""))
    time.sleep(60)

扫描二维码推送至手机访问。

版权声明:本文由dsttl3发布,如需转载请注明出处。

本文链接:https://dsttl3.cn/?id=84

分享给朋友:
返回列表

没有更早的文章了...

下一篇:w3school打开速度慢的解决办法