How to make the 1-wire bus more reliable on a Raspberry Pi

After reboot start “owfs”:
owfs
OWFS stands for 1-wire filesystem. Go to the folder created earlier “/mnt/1wire” and list:
cd /mnt/1wire/
ls
And there you will see folder named something like 28.C2D5C4040000. This number is a serial number unique for every DS18B20. “cd” into this directory and list.
cd 28.C2D5C4040000
ls
You should see file a file named “temperature”.  As you assume, “cat” it
cat temperature
You got what you wanted all the time 🙂
21.1243
After reboot, you have to start owfs again, so issue…
crontab -e
And add a new line with this string:
@reboot sudo -u root owfs
From now on you’ll never have problems again with bad temperature values.

Leave a Reply

Be the First to Comment!

  Subscribe  
Notify of