Can anyone tell me if it is possible to connect the multiple DS18S20 sensors to different GPIO ports and pull the temperature on different ports, as opposed to a single wire option where I can only differentiate by serial number instead of a physical connection?

many man thanks in advance!

  • You are going to be using 1-wire either way, whether or not you connect them in a string on one pin or individually on separate pins. So I don't really understand your question. In any case, I suggest you check out abyz.co.uk/rpi/pigpio/examples.html to see advanced examples of what has been done with gpio pins.
    – SDsolar
    May 5 '17 at 16:04
  • so, in most examples, including the application I have already written, the examples all rely on being able to read from the file in "/sys/bus/w1/devices/28-00*/w1_slave" etc... this allows you to connect multiple, no issue there. However, when you're connecting the sensors, regardless of the physical order in which they are connected, the appear alphabetically in the "/sys/bus/w1/devices/" directory. What I would like to achieve is, being able read the sensors by the physical order in which they are connected up to the PI. This way if one fails for example, then I can check that one only.
    – The_CPT
    May 6 '17 at 20:57
  • I fully understand. What you're asking for is for each device to have its own pin. Makes perfect sense. (Myself, I use an outrigger Nano to do this linked by serial programming cable to send data to the Pi, and I do use separate pins for each sensor.) Upvoted you to draw interest.
    – SDsolar
    May 7 '17 at 1:59

Your Answer

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

Browse other questions tagged or ask your own question.