Posted in linux
3386
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
47
This Month
342
This Year
433

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


Me
Random CSS Property

animation-timing-function

The animation-timing-function CSS property sets how an animation progresses through the duration of each cycle.
animation-timing-function css reference