Created
August 30, 2016 04:59
-
-
Save marschhuynh/86c9da2e71f173070547425cd91ce3e6 to your computer and use it in GitHub Desktop.
Temperature on Raspberry
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cpuTemp0=$(cat /sys/class/thermal/thermal_zone0/temp) | |
cpuTemp1=$(($cpuTemp0/1000)) | |
cpuTemp2=$(($cpuTemp0/100)) | |
cpuTempM=$(($cpuTemp2 % $cpuTemp1)) | |
echo CPU temp"="$cpuTemp1"."$cpuTempM"'C" | |
echo GPU $(/opt/vc/bin/vcgencmd measure_temp) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment