I2C anything

Posted by Daniel on Thu 04 Feb 2021 09:23 AM — 2 posts, 15,458 views.

#0
Hello

Late to the party I am, nevertheless thank you very much for this I2C-anything library that works a treat with two arduinos.

Is there any suggested method of having two different arduinos send their floats to the receiver in the same loop, e.g. by alternating slave adresses? With a simple re-insertion of the section restarting with Wire.begin() and then Wire.begin(new address) I botch things up.

In addition: if I define float f in sender A and float e in sender B the receiver keeps on printing the float value in the serial.Print ("float value e");serial.println(e); -postion regardless no matter if I swap from Sender A to sender B by changing the SCL/SDA while the serial.Print ("float value f");serial.println(f); prints fancy numbers.

If at least the swapping would cause the floats to be printed in the correct position I could maybe pull the respecive senders I2C down in turns....

Any help greatly appreciated
Best
Daniel
USA Global Moderator #1
Template:Arduino
Please post Arduino-related questions to the Arduino Forum or to StackExchange: Arduino. This saves splitting questions and answers between this forum and the Arduino ones.