I had two of these running fine, but now they've stopped. From reading I've done I think this has something to do with kernel updates and device tree. There seems to be about half a dozen options now with numerous permutations of config, but I haven't got it working at all.
I have a Pi B+ and I've wired:
- 4.7kΩ Resistor between pin 1 (3.3V) and pin 7 (GPIO 4)
- pin 1 (3.3V) to the +ve of the DS18B20
- pin 6 (GND) to the ground of the DS18B20
- pin 7 (GPIO 4) to the data of the DS18B20
I am running updated Raspian
Linux raspberrypi 4.1.7+ #817 PREEMPT
From what I've read the options are:
- modules, and possibly parameters, in
- blacklist statements in
device_tree=or not in
/boot/config.txt, and if not, then
dtoverlaystatement that includes
Xis usually 4
extpullup=Yor ommitted where
Yis a pin number?
The device(s) is(are) never listed under
/sys/bus/w1/devices/ where they used to be. I mostly just have
w1_bus_master/ in there.
Things I've tried:
1. Without Device Tree (attempting to go to original config)
This was an attempt to revert to the settings that worked before.
2. Without Device Tree but with more module params
w1-gpio pullup=0 gpiopin=4 extpullup=1 w1-therm strong_pullup=1
3. With Device Tree (hay, it's obviously the cool thing to do)
I've also tried various combinations of blacklisting and listing in
Things I've read that have only muddied my understanding(!)
Not least because I have a Pi B+ whereas many are working with Pi2 which I don't have.
[EDIT] As suggested in comment:
/boot/config.txtdoes not have
device_tree=, thus enabling device tree. It does not contain any
w1-*lines at all.
lsmod shows that neither
w1-therm are there (nor
wire which is usually there when the other two are).
sudo modprobe w1-gpio; sudo modprobe w1-therm there is still nothing in
/sys/bus/w1/devices/, not even the
ls /sys/bus/w1/devices/ has the devices! Thanks @Joan!