Reading Multiple DS18B20 Digital Temperature Sensors

So I have succesfully made a working temperature reading with the help of this site:
EBC Exercise 31 Dallas 1-Wire -
I wanted to add a second sensor. So I wired another sensor to my board, and like this page said at Using a Different GPIO Pin I copied the .dts file and changed the P9.12’s to P8.11 and also the ‘gpio1 28’ at the end.
After a reboot I found that in my /sys/bus/w1/devices there is only a folder for the second added sensor.
I think i missed to change something in the dts file, like an index so it overwrites the sensor on P9.12 or something like that, but I couldnt find any info of this, so I’m asking for your help here.

You don’t need a second header pin. Instead you can read multiple sensors (and other devices) at the same bus (=line/wire/pin). Have a look at libpruw1.


Thank you for your answer, I did not actually use libpruw1 but the documentation helped me understand how the w1 bus works.
I just had to wire all the sensors to the same pin and they are all readable just like expected.
I wrote my own python code to read the sensors thats why I didnt have to use the libpruw1 library project.

Thanks for feedback.

Do you trigger measurement by a broadcast or is each sensor triggered one-by-one?

In my code I made an array with the names of the sensors (28-xxxxxxxxxxxx) and then iterated through all of them and read their w1_slave file and take the temperature value.