Mam taki skrypt:
Code: Select all
#!/usr/bin/python3 -u
#!/home/openhabian/Python3/Python-3.7.4/python -u
#-u to unbuffer output. Otherwise when calling with nohup or redirecting output things are printed very lately or would even mixup
import os
import time
def measure_temp():
temp = os.popen("vcgencmd measure_temp").readline()
temp = temp.replace("'C","")
return (temp.replace("temp=",""))
f=open("proc.txt","w+")
f.write(measure_temp())
Code: Select all
[program:proc-temp]
command=python3 /home/pi/mitemp/test.py
directory=/home/pi/mitemp
autostart=true
autorestart=true
user=pi
