receiving a string over wire (i2c)

Hi again all,

I am struggling with my dual arduino setup. I have one doing some calculations, and sending a string such as <int,int,int,int,int> to the other arduino over i2c. I am receiving the string, but I have a problem using the function void receiveEvent(int howMany) from the slave_receiver in the wire library. The problem is that it is called using Wire.onReceive(receiveEvent); which is not what I’m used to. What do I do if I want the function to return a string? Do I call it by Wire.onReceive(char receiveEvent);??

If I can get the string out from the function, I could figure out what to do with it.

Any thoughts?

The receiveEvent method can store data in a global variable, rather than returning it.


Works fine now!