How to use Python code to remotely monitor Raspberry Pi 3 cpu temperature

preview_player
Показать описание
Introduce digital products review, unboxing, windows app, Excel functions user manual, Linux command, Android mobile App review, programming language | manuals | tutorial, Python/Python 3/Ipython, Pydroid on mobile coding, C/C# coding, etc.

How to use Python code to remotely monitor Raspberry Pi 3 cpu temperature.
#!/usr/bin/python
#coding:utf8
import commands,time
while True:
# 获取CPU温度
tmpFile = open('/sys/class/thermal/thermal_zone0/temp' )
cpu_temp = round(float(cpu_temp_raw)/1000, 1)
print cpu_temp

Make sure to subscribe this channel and hit the bell to not missing any updates in future and leave your comments about the topic down bellow. I read every single comment and will get back to you soon.

Thank you so much for every one's love and support. 😀
#Average_Logs
Рекомендации по теме
Комментарии
Автор

thanx for the code!!
i was getting a floating byte error so used this at the start:

# -*- coding: utf-8 -*-

MayankJairaj