I have recently purchased a Raspberry Pi Zero w and soldered the GPIO pins. I set up a DS18B20 and everything worked fine. I used some other pins as inputs and went back to check the sensor but the pi couldn't detect it. I doubled checked with another pi (3B), using the same SD card and sensor layout and it could be detected.
I've followed all other guides for setting up the DS18B20; changing the /boot/config.txt file, double checking the layout, setting the w1 to gpio4, but nothing seems to work.
I guess I am just confused why it works on my 3B pi but not my pi zero. Any suggestions?
My only thought is that I might have messed up the GPIO pins on my zero while trying to use some as inputs.
It should also be noted that I can use the pins as outputs just fine. I have a 7-segment display hooked up and it can run through all the numbers. Also I can see devices under /sys/bus/w1/devices but they all start with 00-* so I know none of these are the temperature sensor. Again the same setup works on a different pi and was originally working on my zero. I also tried other pins for the data input on the zero with no luck. Thanks for the help!
UPDATE: It appears that my pin7 is no longer responsive. I tried all the tests with pigpio and they all passed, however after trying with a voltage meter I can see that pin 7 does not respond. I tried the thermometer with another pin and changed the /boot/config.txt to include the pin I wanted w1 to use and it worked fine. Might've accidentally shorted it with 5v while trying input? Not exactly sure but glad I can see the sensor again.
sudo pigpiod
, then./gpiotest
. See here for details. – joan Sep 13 '19 at 05:08