2

I've got a DS18B20 Temperature Probe connected to my Pi but it can't seem to detect it.

I run:

sudo modprobe w1-gpio
sudo modprobe w1-therm

and then go to cd /sys/bus/w1/devices and do ls and it shows the file as empty.

I know its not a problem with the sensor wiring or anything physical as I have 2 sensors and 2 Pi's and both sensors work fine on one of the Pi's. Also I note that there isn't a w1_bus_master1 listed which there should be even with no sensor connected.

The problem seems to have been since I reinstalled Wheezy on the Pi (due to issues in other stuff I was doing) as before that, it worked fine so I feel like i've simply missed some download/upgrade I need for it to work that i did originally and have now forgotten. I've run plenty of apt-get updates and upgrades but have had no luck.

Anyone have any ideas?

  • Does raspberrypi.stackexchange.com/questions/27073/… apply? – joan Feb 9 '15 at 18:12
  • Yes it does, I added the w1-gpio line to config.txt and its finally picking up the sensor. Thank you so much, you just made my day. – Kersakov Feb 9 '15 at 18:27
  • I have the same problem but adding the lines to /boot/config.txt did not do the trick... does anyone have an idea what else I could try? – user44418 Apr 5 '16 at 12:27
3

Added the line:

dtoverlay=w1-gpio-pullup,gpiopin=x (where x is my gpio pin)

to /boot/config.txt as suggested in the comment.

0

If you have a newer version of Wheezy, DO NOT enable "Device Tree" in the Configuration program! I find that it cause all kinds of havoc with you Pis' hardware.

Doing so, you WON'T have to add the line mentioned above.

  • What havoc, what is this answer based on, can you cite reference? – Steve Robillard Mar 9 '15 at 2:55
  • While the "havoc" statement may be a bit undefined, turning the device tree off actually fixed my problem! I don't know if I toggled that on manually some time ago, and did not reboot for some weeks until I forgot that it was that RPI which I enabled the Device Tree for, but this answer really saved my butt from doing ugly hard and software debugging. – Daniel F Mar 13 '15 at 17:13

protected by Ghanima Apr 5 '16 at 12:36

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.