Posted in linux
3303
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
85
This Month
360
This Year
350

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
Even if you fall on your face, you're still moving forward.
Victor Kiam
Random CSS Property

overflow-wrap

The overflow-wrap CSS property applies to inline elements, setting whether the browser should insert line breaks within an otherwise unbreakable string to prevent text from overflowing its line box.
overflow-wrap css reference