Skip to content

Instantly share code, notes, and snippets.

@boumannm
Created August 8, 2019 19:58
Show Gist options
  • Save boumannm/a21061974b0665ba7416f1bc17b08c4c to your computer and use it in GitHub Desktop.
Save boumannm/a21061974b0665ba7416f1bc17b08c4c to your computer and use it in GitHub Desktop.
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)
/opt/vc/bin/vcgencmd measure_temp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment