-
Notifications
You must be signed in to change notification settings - Fork 0
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
Full example to make two Arduinos speak to each other? #1
Comments
Hi Aidv, This SoftI2C library can be utilized as an I2C master, not as an I2C slave. Consequently, you cannot establish communication between two Arduinos using SoftI2C. If you wish to facilitate communication between two Arduinos, you'll need to employ hardware I2C on the slave node instead. |
So, if you need it, I can provide an example demonstrating communication between two Arduinos using SoftI2C on the master and hardware I2C on the slave. |
Where is the official statement of this? And isn’t it technically possible to use a different software i2c with master functionality and use SoftI2C as software i2c slave? |
Yes please it would be of great help |
And btw, why don’t you add master mode for SoftI2C? |
I just re-read the README, and nowhere is there a statement that SoftI2C is slave-only. |
Sorry, I wrote the statement incorrectly. Actually, this library only works for I2C master, not slave. |
Sure, I will add the example of communication between two Arduinos tomorrow. |
Thanks. Could you add slave support in the future? |
Sure, I will. |
That woulf be great. Thanks! I have this weird project where I need more i2c buses than available on the mcu that I need to use, and I can’t use a different mcu either. |
Thanks from me too, Mr. Shahzad, for the code here already, and any additional features you decide to undertake. I see the benefit of a software peripheral ("slave") side in these terms: because I2C operates right down on the wires and pins, the best-suited peripheral devices are simple. They're so hard-wired that aidv's use case can be provoked simply by putting more than one of the same type of peripheral on a bus. Because that's a common problem, someone invented I2C bus multiplexers (or fanouts), and that's what I would use for that purpose. But for any other thing that we, as developers, might think to do in an I2C peripheral, we're stuck at the gate, because nothing that hangs from an I2C bus will let us blow any firmware onto it. [Formally, perhaps I should have opened an issue for the feature request. It isn't a bug, and the title of this issue doesn't imply it. But I think the feature request has informally already been made and accepted.] |
@dave-aragon I agree. In my case, the I2C buses can be slow, they don't even have to be all that fast. My devices will be sending data between each other at most once a second and the size of the data buffer will be small, maybe 10 bytes at most |
Hi, could you provide an example project where two Arduinos speak to each other?
I'm trying to understand how to both read and write data between two Arduinos using SoftI2C.
The text was updated successfully, but these errors were encountered: