Hello, if I have multiple devices (e.g. sensor, sdcard circuit, another arduino) that require an I2C port, what can I do? As far as I know, there is only one I2C port on the Mega and UNO.
Besides I2C, what is the best way to connect a Mega and an UNO together for them to share data? I am interested in both wireless and wired solutions. Thank you
Wow, that is nice! How can I do that both hardware-wise and software-wise? Do I connect SCL and SDA to a breadboard and use it as a hub to connect to different devices that need I2C?
Is there a limitation on the number of things that can be connected to one I2C? Will the speed be slowed down?
Connect SCL to all devices, connect SDA to all devices, pull up both to 5V with 4.7K resistors. Connect all devices Gnds together also.
Master will pull SCL low to start a transfer, slave all listen for their address to respond to.
Limit is driven by the capacitance of all the wiring used to connect everything. Keep it short & neat.
Most devices work at 100KHz SCL clock, or 400 KHz.
Do some reading here: