Tracking Raspberry Pi Internal Temperatures in Computer Vision Applications

from temperature_tracker import TemperatureTracker
temperature_tracker = TemperatureTracker()
temperature_tracker.start()
temperature_tracker.update()
now = temperature_tracker.now()
# log block showing current temperature
text.append(“{:1.2f}C/{:1.2f}F at time {}\n”.format(now[0], ((now[0]*(9 / 5)) + 32),time.strftime(‘%Y-%m-%d %H:%M:%S’, now[1])))
# details whether the temperature is safe for a Raspberry Pi 4
if now[0] < temperature_tracker.MAX_TEMP_RASP4:
text.append(“Temperature is safe”)
else:
text.append(“TEMPERATURE IS NO LONGER SAFE”)
if now[0] >= temperature_tracker.MAX_TEMP_RASP4:
print(“Maximum safe temperature reached, stopping program”)
break
temperature_tracker.stop()
summary = temperature_tracker.summary()
print(summary)
aai app configure
aai app deploy
aai app start

 

Get started now

We are providing professional developers with a simple and easy-to-use platform to build and deploy computer vision applications on edge devices.

Get started