Categories
Без категория

Скрипт за температурата в Raspberry Pi

nano monitor-temp.py
import os                    
import time       
            
def measure_temp():
        temp = os.popen("vcgencmd measure_temp").readline()
        return (temp.replace("temp=",""))

while True:
        print(measure_temp())
        time.sleep(1)
python monitor-temp.py