How To Connect Multiple I2C Sensors/devices With Arduino

  • TUTORIALS
  • HARDWARE & TOOLS
  • REFERENCES
  • FAQs
  • ABOUT US
Home FAQs How to connect multiple I2C sensors/devices with Arduino

I want to connect two, three or more I2C sensors/devices to Arduino (as slave), How can I do it??

Answer

You need to do the following:

  • Make sure that each sensor/device should have a unique I2C address to these sensors/devices. In the case of the addresses are duplicate, you need to change I2C address of the sensor/device to make it unique. To change I2C address of a sensor/device, you need to read its datasheet or manual. Manufacturers usually offer one of the follwing ways to change I2C address:
    • Changing I2C address via command
    • Changing I2C address via a jumper (soldering may required)
  • For wiring, you can connect all I2C sensors/devices to the same Arduino I2C pins (SCL, SDA, VCC, GND).
  • In the code, you just need to specify the unique I2C address for each sensor/device

To check I2C address of a sensor/device, see How to know I2C address of sensor/device

Buy Arduino

1 × Arduino UNO Buy on Amazon
1 × USB 2.0 cable type A/B Buy on Amazon
Disclosure: Some links in this section are Amazon affiliate links. If you make a purchase through these links, we may earn a commission at no extra cost to you.Additionally, some links direct to products from our own brand, DIYables .

The Best Arduino Starter Kit

  • See the best Arduino kit for beginner

See Also

  • Arduino - Button value changes between 0 and 1 randomly
  • Servo motor does not work
  • How to use external power supply for Arduino
  • How to make the wiring tidy, neat, and firm
  • Serial Monitor shows weird characters

※ OUR MESSAGES

  • We are AVAILABLE for HIRE. See how to hire us to build your project
  • If this tutorial is useful for you, please give us motivation to make more tutorials.
DISCLOSURE ArduinoGetStarted.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com, Amazon.it, Amazon.fr, Amazon.co.uk, Amazon.ca, Amazon.de, Amazon.es, Amazon.nl, Amazon.pl and Amazon.se Copyright © 2018 - 2025 ArduinoGetStarted.com. All rights reserved. Terms and Conditions | Privacy Policy Email: [email protected] ×

Tag » Arduino Nano Multiple I2c Devices