Created
July 15, 2014 15:41
-
-
Save Idorobots/668e7c43bc1d8a2776a6 to your computer and use it in GitHub Desktop.
Parallella temp script
This file contains hidden or 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 | |
raw=`cat /sys/bus/iio/devices/iio:device0/in_temp0_raw` | |
offset=`cat /sys/bus/iio/devices/iio:device0/in_temp0_offset` | |
scale=`cat /sys/bus/iio/devices/iio:device0/in_temp0_scale` | |
c_temp=`echo "scale=1;(($raw + $offset) * $scale) / 1000" | bc` | |
f_temp=`echo "scale=1;(($c_temp * 9) / 5) + 32" | bc` | |
echo | |
echo "Zynq Temp: $c_temp C / $f_temp F" | |
echo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment