Go Down

Topic: I can't send sensor readings to slave via I2C but can send set variable values. (Read 310 times) previous topic - next topic

RockyDo98

I've connected an Arduino MEGA (Master) to an MKR1010 (slave) using I2C to send various environmental data to my MKR and then Arduino Cloud.

The I2C communication appears to work as expected although the measured variables appear to stop updating once the MKR connects to the Arduino Cloud. So far I've been able to narrow down to be where I believe the problem occurs which is at the  ArduinoCloud.update(); statement or somewhere within the reciveEvent function.

However the   ArduinoCloud.update(); statement is required to update the variables used for the Arduino cloud's dashboard variables.

I suspect that the problem has something to do with me using I2C in general or the I2C_Anything library which is used to send data larger than bytes. Which updates the variables measured in the void function receiveEvent.


Any help or potential insight as to what the problem may be are would be highly appreciated  :)

RockyDo98

Update

I've managed to work around the problem, it appears that the code continues to work when connected to the arduino cloud when using the standard Wire.h library for I2C but not the I2C_Anything library. I still haven't figured out what specifically causes the bug but it is certainly related to this library.

I know no one has replied to this problem but hopefully this will provide others with future insight and save time on this problem if it becomes pparent for them too :)

Go Up