Code: Select all
# Fetch Temperature Reading
x = os.system("/opt/vc/bin/vcgencmd measure_temp >/xyz/pi_cpu_temp.txt") why not just use
chmod 777+ vcgencmd
./vdgencmd measure_temp
That's the more common way i seen.
Code: Select all
# Fetch Temperature Reading
x = os.system("/opt/vc/bin/vcgencmd measure_temp >/xyz/pi_cpu_temp.txt") lilzz wrote: why need to use os.system to execute the executable?
the file should alreasy be marked as executable so chmod should not be necessary.lilzz wrote: chmod 777+ vcgencmd