Connecting Multiple Sensors to Pi using GPIO + Stemma QT (Qw

Play with it! Please tell us which board you're using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
clpie
 
Posts: 21
Joined: Fri Jul 02, 2021 5:38 am

Connecting Multiple Sensors to Pi using GPIO + Stemma QT (Qw

Post by clpie »

Hi there,

I connected a sensor (Sensirion SHT31-D - Temperature & Humidity Sensor) to my Raspberry pi, as follows (download/file.php?id=85309) ... but I would also like to connect another sensor at the same time (DPS310 Precision Barometric Pressure / Altitude Sensor)

Both have qwiic compatible STEMMA QT and require connection to GPIO with 4 cables... but the tutorial diagrams show them connecting to the same pins...

Is it possible to connect both at the same time? In which case, how would I know which pins to use for the second sensor? ... would that then require some manual config in code?

If anyone can help that would be great as not sure where to look/start...

Thank you! :)

User avatar
dastels
 
Posts: 15656
Joined: Tue Oct 20, 2015 3:22 pm

Re: Connecting Multiple Sensors to Pi using GPIO + Stemma QT

Post by dastels »

They are both I2C devices, and they connect to the same SDA/SCL/power/ground. You can use a QT to QT cable to connect the two boards together: https://www.adafruit.com/product/4399.

Each device as a different address which is used by the respective library. You shouldn't have to do anything beyond connecting them.

Dave

User avatar
clpie
 
Posts: 21
Joined: Fri Jul 02, 2021 5:38 am

Re: Connecting Multiple Sensors to Pi using GPIO + Stemma QT

Post by clpie »

Brilliant. Thank you for your help :)

Locked
Please be positive and constructive with your questions and comments.

Return to “Circuit Playground Classic, Circuit Playground Express, Circuit Playground Bluefruit”