Hi guys! I'm using python on raspberry pi 4. I'm stucked on this code:
import os
cmd = " vcgencmd measure_temp | egrep -o '[0-9]*\.[0-9]*' "
cputemp = os.system(cmd)
(vcgencmd means the temperature of CPU)
I want to make a code like that:
if cputemp > 50:
print("hot")
import os
cmd = " vcgencmd measure_temp | egrep -o '[0-9]*\.[0-9]*' "
cputemp = os.system(cmd)
(vcgencmd means the temperature of CPU)
I want to make a code like that:
if cputemp > 50:
print("hot")