Posted in linux
3299
11:39 pm, February 17, 2021
 

how to check the temperature of the pi using command line

to get the temperature of the pi in shell or command line type the following:

BASH

vcgencmd measure_temp

This measures the GPU temperature.

Which should generate something like this:

To get the ARM CPU temperature you will need a bit of a shell script.

Add this to a .sh file and make it executable

BASH

nano ~/temp.sh

in this file add the following

BASH

cpu=$(</sys/class/thermal/thermal_zone0/temp)
echo "$((cpu/1000)) c"

then make the file +x or executable with chmod

BASH

chmod +x ~/temp.sh
~/temp.sh

Here is a working example:

View Statistics
This Week
81
This Month
356
This Year
346

No Items Found.

Add Comment
Type in a Nick Name here
 
Search Code
Search Code by entering your search text above.
Welcome

This is my test area for webdev. I keep a collection of code here, mostly for my reference. Also if i find a good link, i usually add it here and then forget about it. more...

Subscribe to weekly updates about things i have added to the site or thought interesting during the last week.

You could also follow me on twitter or not... does anyone even use twitter anymore?

If you found something useful or like my work, you can buy me a coffee here. Mmm Coffee. ☕

❤️👩‍💻🎮

🪦 2000 - 16 Oct 2022 - Boots
Random Quote


Not Sure
Random CSS Property

font-variant

The font-variant CSS shorthand property allows you to set all the font variants for a font.
font-variant css reference