Created
April 20, 2015 16:07
-
-
Save errkk/981b51761e7ac8f1541e to your computer and use it in GitHub Desktop.
Print just the temperature from a DS18B20
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
# Print the number in degrees | |
awk -F'=' '/ t=/ { print $NF/1000 }' /sys/bus/w1/devices/$DEVICE_ID/w1_slave | |
# For Curling | |
curl $URL --data "value=$(awk -F'=' '/ t=/ { print $NF/1000 }' /sys/bus/w1/devices/$DEVICE_ID/w1_slave)" --compressed; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment