2 sensors esp easy - esp12

Everything about esp8266 and more.

Moderator: leecollings

Post Reply
DaWauZ
Posts: 69
Joined: Wednesday 05 November 2014 10:14
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Netherlands
Contact:

2 sensors esp easy - esp12

Post by DaWauZ »

How should I connect 2 sensors i2c ?
I have 1 now on the sda and scl and is working fine.
When I add an extra device it is giving me the same gpio pins I am already using. Can I connect the wires of both sensors together? Sounds strange but I don't know exactly.
I tried on other pins but nothing special happens.
BME-280 and BH1750 sensors.

Edit:

I found out that you can use rules to rule the gpio ports. I cant find a good example for ruling 2 sensors, does someone had an example for me?
Raspberry Pi 2 model B with domoticz
OMV NAS installed on thin client HP T610
Openelec Kodi Mediaplayer on thin client HP T520 (and with multiboot windows 10)
randytsuch
Posts: 90
Joined: Sunday 20 March 2016 18:56
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: LA, Ca USA
Contact:

Re: 2 sensors esp easy - esp12

Post by randytsuch »

You can connect multiple devices on an I2C bus as long as they have different addresses.

If they are different i2c devices, they should have different addresses.
DaWauZ
Posts: 69
Joined: Wednesday 05 November 2014 10:14
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Netherlands
Contact:

Re: 2 sensors esp easy - esp12

Post by DaWauZ »

OK so connecting wires together is nog problem?
Finally I found this wiki and drawings, is it needed to connect the 3v and sda / scl lines and resistors, I will not use a display.
https://www.letscontrolit.com/wiki/inde ... C2%B2C_Bus

by reading it triple times, it seams to be needed, 2 10kohm.
Raspberry Pi 2 model B with domoticz
OMV NAS installed on thin client HP T610
Openelec Kodi Mediaplayer on thin client HP T520 (and with multiboot windows 10)
Post Reply