Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from gpiozero import CPUTemperature
- from time import sleep, strftime, time
- cpu = CPUTemperature()
- temp = cpu.temperature
- maxtemp = temp
- mintemp = temp
- while True:
- temp = cpu.temperature
- if temp >= maxtemp:
- maxtemp = temp
- if temp <= mintemp:
- mintemp = temp
- print('Current temp: ', temp, 'Max temp :', maxtemp,'Min temp: ', mintemp)
- sleep(5)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement