Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to use 2 or more sensors in only 1 i2c bus? #14

Closed
thedonalddon opened this issue Jul 22, 2019 · 2 comments
Closed

Is it possible to use 2 or more sensors in only 1 i2c bus? #14

thedonalddon opened this issue Jul 22, 2019 · 2 comments

Comments

@thedonalddon
Copy link

I have three plants, and I bought 3 sensors for each of them. I'm using an ESP8266 as I2C master and a Raspberry Pi as the controller.
But on ESP8266 I could use only 2 GPIOs as SCL and SDA. Is it possible to connect 3 chirps at the same time using the same i2c bus?
(sorry the question might be silly, I'm kind of rookie about this..)

@Miceuz
Copy link
Owner

Miceuz commented Jul 22, 2019

You can hook up several sensors on the same SCL, SDA lines. Before doing that you have to hook up a single sensor to the bus one by one and set different addresses for each sensor. Don't forget to add pullup resistors if they are not on the esp8266 board yet.

Also if you experience communication stability problems, try lowering pullup values and/or communication speed.

Also it seems you could use a basic tutorial on I2C bus - Sparkfun has a pretty good one that's easy to find.

@Miceuz Miceuz closed this as completed Jul 22, 2019
@thedonalddon
Copy link
Author

The tutorial is really helpful! Should've read it earlier. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants