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

Bidirectional data sharing? really need this for my project... #16

Open
RootlessAgrarian opened this issue Apr 28, 2017 · 4 comments
Open

Comments

@RootlessAgrarian
Copy link

EasyTransfer I2C is great and I have been using it successfully with master transferring data to slave. However I have recently had to shuffle functions around between duinos in my project and it's no longer possible to have one I2C master in possession of all relevant data; the slaves now are reading sensors of their own and should report some data back to the master, as well as receiving data from the master.

I was hoping that there was a (master) function ET.requestData(I2C_SLAVE_ADDRESS) but alas it does not seem to exist yet. I had hoped that I could define the shared data struct, write certain values at the slave end, request the struct from the slave, read it on the master, write certain other value at the master end, send it to the slave, and so on. Having the master drive the timing of this conversation is fine, I don't need the slaves to initiate any events.

Is it possible (please) to do this? I am not an advanced Arduino hacker or a very gifted C programmer, but if I had a bit of sample code I could definitely adapt it.

@RedyAu
Copy link

RedyAu commented Jun 11, 2017

It can do that. See 2Way example in the original version's folder.

@nielsnl68
Copy link

nielsnl68 commented Jun 11, 2017

Hi, i have the OP, i have one master i2c arduino and multiple client arduinos what is not easy to work wirh when the clients need to update the master frequently.

When i read the code you suggested, then the communicatie will by serial between two arduinos and that is not what th OP and i needs.

Or did you refar to an other example?

@RedyAu
Copy link

RedyAu commented Jul 25, 2017

The library works the same way on every communication system (serial, i2c, soft-serial...). Download and use the one you need.
Edit: Oh! I see. There is no example for i2c. Well, then reuse the logic code, and not the including and configuration from the serial one.

@MG-Arnaud
Copy link

Hello,

if you would like, you can find my example and the explications on this issue : #9

I2C_example_MS.SM.zip

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

4 participants