Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python3
- import os
- import time
- def measure_temp():
- temp = os.popen("vcgencmd measure_temp").readline() # just runs a shell command
- return (temp.replace("temp=",""))
- while True:
- print(measure_temp())
- time.sleep(1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement