3

Like other posters I have connected the temperature sensor (from ModMyPi Hacker Kit) a variety of ways and can not get my Raspberry Pi 2 to recognise it. I have unsuccessfully followed posts to diagnose on:

After running:

sudo modprobe w1-gpio
sudo modprobe w1-therm
cd /sys/bus/w1/devices/
ls -l

I see 0 devices found.

All the posts assume that the end user will find the device and there is no debugging assistance. As a new Raspberry Pi owner and novice, how do I go about debugging to find where the issue is i.e. is it the temperature sensor that I have fried or is it the w1 bus that is faulty, or even a bad breadboard?

UPDATE 18/02/2015 # 1 SOLVED.
I swapped all wires and the sensor now works. Must have been a combination of Device Tree, Raspian, firmware, and bad wires.

UPDATE 18/02/2015 Updated Raspian (3.18.7-v7+ #756) Updated firmware. Still no joy.

Raspian and Firmware version

UPDATE 17/02/2015 Still no luck I'm afraid. I have edited the /boot/config.txt as per @Geerlingguy. I now have devices listed in /sys/bus/w1/devices, but they don't look substantial. Running cat w1_slave in any of the subsequent directories fails. I suspect this is also because something is missing after the Device Tree firmware update. See the latest image below:

w1 devices suspiciously without temperature sensor?

The breadboard is powered on the red and ground rail. The GPIO pins are 1 (3.3 V), 6 ground, 7 GPIO 4 according to this post.

Bread board view 1

Bread board view 2

GPIO pins

  • Can we see a picture of the connections, and what version of the Pi are you using? – Steve Robillard Feb 16 '15 at 9:36
  • ok. will post picture this evening, but have tried configurations in both linked posts. Have Raspberry pi2 – sarin Feb 16 '15 at 9:38
  • @SteveRobillard pictures added. Any ideas? – sarin Feb 16 '15 at 20:53
5

See related: Firmware 3.18.x breaks I²C, SPI, audio, lirc, 1-wire (e.g. /dev/i2c-1, No such file or directory)

Basically, the latest firmware for the Raspberry Pi enables Device Tree, and also breaks the myriad tutorials for getting 1Wire devices (like the DS18B20) working through GPIO.

The fix is pretty simple:

  1. Edit /boot/config.txt
  2. Add the line dtoverlay=w1-gpio
  3. Reboot the Pi

See FAQ: I2C, SPI, I2S, LIRC, PPS, stopped working? Read this.

  • I would also add that uses should update their Raspian and firmware also. – sarin Feb 18 '15 at 22:58
-1

You also need to update the Adafruit driver to work with the Raspberry Pi 2 and use AdafruitDHT.py as the new driver.

-3

I was having trouble trying the same experiment (this was also my first time using the Raspberry PI). My problem was that I had the ribbon cable the wrong way around! :)

  • If you look at the pictures this is obviously not the case. – Steve Robillard Jun 20 '15 at 22:54
  • Right I get your point in this being "the exact right answer" for the exact situation and all. Honestly I often get much useful information from sub-comments. People reading this page looking for answers may be reading tutorials about this experiment online, which recommends using a cobbler with a ribbon cable. So this info may be relevant to someone trying the same experiment and getting stuck. (I didn't see it anywhere else) It would have been nice to see this info an hour earlier. I did not know it was possible to get the cable the wrong way around. Not knowing, how would I debug? – f1lt3r Jun 22 '15 at 0:05
  • 1
    In theory someone may come across this question and may be using a ribbon cable is a very weak reason to keep it around. Rather than posting this as an answer to a tangential question at best, you would have been better off and helped others more by posting a separate question even if you answered it yourself. The SEO and search ability would have been improved, making it easier to find. The question/solution would have been more specific and your answered would likely have been upvoted. Ask yourself this how likely would you be to try a negatively voted solution. – Steve Robillard Jun 22 '15 at 1:02
  • As for connecting the cable backwards the adafruit instructions learn.adafruit.com/adafruit-pi-cobbler-kit/solder-it clearly point this out, and there are several other questions on this site where this was the problem. – Steve Robillard Jun 22 '15 at 1:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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