Skip to content

Instantly share code, notes, and snippets.

@lasitha-sparrow
Forked from kevalpatel2106/monitor-temp.py
Created January 12, 2020 16:47
Show Gist options
  • Save lasitha-sparrow/ddaf7e21b817c274d5891709748a563c to your computer and use it in GitHub Desktop.
Save lasitha-sparrow/ddaf7e21b817c274d5891709748a563c 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment