Raspberry Pi 4: LED CPU Temperature Bar Graph Monitoring

Channel:
Subscribers:
2,830
Published on ● Video Link: https://www.youtube.com/watch?v=Pe4auFdEmOM



Duration: 3:04
575 views
18


In this video, i will show you how to create an LED Bar Graph to monitor CPU temperature.
The First LED will slowly light up when the minimum temperature is reached.
Then All LED will light up when the maximum temperature is reached.
This will work on any raspberry pi versions.

##############################
LED Bar Graph Python Script
##############################

from gpiozero import LEDBarGraph, CPUTemperature
from signal import pause


CPU_temp = CPUTemperature(min_temp=40, max_temp=60)
LED = LEDBarGraph(16 ,19 ,20 ,21 ,pwm=True)

LED.source = CPU_temp

pause()

###############################