Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 24 lines (20 sloc) 400 Bytes
#!/bin/bash
#
# This script looks through your DS1820B devices and checks that they are functioning properly.
#
# YES or NO Provided
#
#
devlocation=/sys/bus/w1/devices
cd $devlocation
oursensors=($(ls -d */))
i=0
for value in "${oursensors[@]}"
do
if [[ $value == 28* ]]
then
echo "Sensor $i"
cat "$devlocation/$value/w1_slave" | grep "crc" | sed -r 's/^.{36}//'
i=$(($i+1))
fi
done