http://foxg20old.acmesystems.it/doku.php?id=tutorial:1wire Foxboard own system is now owfs installation of owfs: make ended with some errors. Does not work. So will use the built in 1-wire. It is OK, just data format strange. 1-wire bus moved from PB16 (J7.5) to PB31 (J6.19) cd /sys/bus/w1/devices cd 28-000002c5a744 cat 28-000002c5a744 myfox:/sys/bus/w1/devices/28-000002c5a744# cat w1_slave 50 05 4b 46 7f ff 0c 10 1c : crc=1c YES 50 05 4b 46 7f ff 0c 10 1c t=85000 Always gives the default value of +85C. reducing R to 1k or 1.5 k helps Code to get out temperature, does not work under crontab, hex simbols screw up -------------------------------------------------------- A=$(tail -1 /sys/bus/w1/devices/28-000002bb4cd2/w1_slave) echo $A B=${A:29:30} C=$(echo "scale=3; $B/1000" | bc) echo $C -------------------------------------------------------- Need to use python wget http://foxg20.acmesystems.it/download/examples/scan1w.py wget http://foxg20.acmesystems.it/download/examples/tread.py chmod 777 * cd /var/www/ ./scan1w.py ./tread.py Temperature out of python is often CRC error. Need to check if value OK. Via intermediate file. t1.py ---------------------------------------- #!/usr/bin/python import time import fox indoor = fox.DS18B20("000002c5a744") print "%.2f" % (indoor.getTemp()) ---------------------------------------- t.sh ------------------------------------------ B="" while (true);do ./t1.py > t1.txt A=$(cat /var/www/t1.txt) echo "A="$A B=$(echo "scale=3; $A/1" | bc) echo "B="$B if [ -n "$B" ]; then echo " sensor value good, breaking"; break else echo " read sensor again" fi done ------------------------------------------