I have added 2 DS18B20 sensors to my Raspberry pi 1, both sensors shows up in /sys/bus/w1/devices
and I can only read data from one of them, the other simply has a empty w1_slave file.
They are not both connected to the same pins, the working one is connected to GPIO14 and the one not working but listed is connected to GPIO17.
I have this in my /boot/config.txt file:
dtoverlay=w1-gpio,gpiopin=14
dtoverlay=w1-gpio,gpiopin=17
and I use this script to pull up the resistor:
import RPi.GPIO as GPIO
GPIO_PIN_NUMBER=17
GPIO.setmode(GPIO.BCM)
GPIO.setup(GPIO_PIN_NUMBER, GPIO.IN, pull_up_down=GPIO.PUD_UP)
There is 2 of those files where the other one has GPIO_PIN_NUMBER=14
In /sys/bus/w1/devices
I see this:
28-00000003ae63 28-00000003c175 w1_bus_master1 w1_bus_master2
And the 28-00000003c175
is the working one which reports the temperature but the 28-00000003ae63
has the empty w1_slave file.