Hello, I'm making some small project and I need to connect multiple sensor that are using I2C, i bought multiplexer (TCA9548A), but to be honest i dont really know how to write code using it and all tutorials i've watched i don't understand them very well, Sensors that i'm using are: veml6075,bmp280, and lcd 4x20, can someone direct me or help me with this please. Thanks
I see no need for a multiplexer. It appears none of those devices have conflicting i2c addresses.
So i can just connect them using protoboard with parallel connecting i think i saw that?
Yes.
Do I need to use resistor as i saw one guy is using that and I dont have them sadly
Not normally. Connect the devices one at a time. If the first device does ok, then there is a pullup resistor on the pins already.
Thanks a lot.
I should have mentioned the i2c_scanner sketch.
It will report i2c devices on your bus. Very handy!
Hi just tried connecting on protoboard but but when i use i2c sketch only lcd is visible (only closest sensor/lcd is visible), what should i do?
It should show as address 0x70.
If it isn't showing up on the scanner, check your wiring.
Check your soldering also. No cold solder joints or solder bridges, right?
What do you mean by closest?
How far away are the other sensors?
Which Arduino are you using?
Do all THREE modules have pull-ups?
By closest i mean the one who is just under SLC/SDA on protoboard/breadboard, I use arduinoMega, and on i2c sketch i can only see LCD address because that's LCD's SCL, SDA are the first one just under SCL SDA i pulled from arduino to board.
Check your wiring and solder.
Check your protoboard.
How long are the wires from the Arduino to this board?
Can you show a picture of how you haveit wired?
Wires are 20cm, just left my friend's house where we are making this, and I will try to continue it tomorrow
OK, tomorrow
But it's mess of wires there haha, a lot of sensors already connected ahhaah
That may be your problem. I2C wiring need to be nice and tidy, otherwise you can have problems.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.