How to display CPU Temperature of Raspberry Pi running Raspbian
Recently I was playing with my old Raspberry Pi B3 with Raspbian installed on it and noticed that that its getting overheated and displaying a red thermometer at the upper right hand corner of the screen.
That's when I decided to write a simple few line script which can tell me what the current CPU temperature is of my Pi.
There is a command that can be used to display the current Temperature of Pi.
vcgencmd measure_temp
Now I wanted to automate it so that it displays the temp every few seconds.
Wrote a simple bash script and saved it as .sh
apply +x permissions to the script and execute it:
while true; doecho `date` : `vcgencmd measure_temp`ping -c 5 localhost >/dev/null;done
Now here is the Demo
Good Luck :)