Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
RaspberryPiGetDeviceTemp.py
import os
def getCPUtemperature():
res = os.popen('vcgencmd measure_temp').readline()
return(res.replace("temp=","").replace("'C\n",""))
print(getCPUtemperature())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.