I would like to know is it possible to connect for example: thermometer and pressure sensor to one GPIO?

1 Answer 1


The answer is: it depends.

If you are dealing with 1-wire bus sensors, which are digital and can understand individual addressing, it is perfectly possible.

Just stack up to 10 of them in the 1-wire GPIO pin (check adafruit's tutorial on how to connect one and repeat for up to 10 in the same pin). This works, I have a configuration with 2 DS18B20 working perfectly.

The i2c protocol is also addressed, and should support connecting more than one device likewise. I haven't personally tested the implementation used on the Pi to be sure.

Other sensors/protocols might not understand addressing and just might not work.

  • 1
    I2C certainly works on the Pi. It needs two gpios, for data and clock (and a ground connection). You can connect as many devices as can be uniquely addressed (112 for the Pi's 7 bit addressing). I've only had four connected at once.
    – joan
    May 2, 2014 at 0:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.