Bernd wrote, on 12-01-2019 09:20:
> Meanwhile I have found how to measure the temp
> from the RasPi.
Readable output, not directly useful in scripts:
$ vcgencmd measure_temp
temp=46.2'C
Value in millidegrees:
$ cat /sys/class/thermal/thermal_zone0/temp
47236
Value in degrees rounded down, so 47.9 becomes 47:
$ echo $(($(cat /sys/class/thermal/thermal_zone0/temp)/1000))
47
Value in degrees with one decimal, using bc:
$ echo "scale=1;$(cat /sys/class/thermal/thermal_zone0/temp)/1000" | bc
46.5
The same thing without bc:
$ vcgencmd measure_temp | cut -d= -f2 | cut -d\' -f1
46.2
(The decimal separator is not localised for any of these.)
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|