Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to "verify" your details, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.
 Entire forum ➜ Forum ➜ Problems ➜ I2C anything

I2C anything

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Daniel   (1 post)  Bio
Date Thu 04 Feb 2021 09:23 AM (UTC)
Message
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
Top

Posted by Fiendish   USA  (2,533 posts)  Bio   Global Moderator
Date Reply #1 on Thu 04 Feb 2021 03:39 PM (UTC)
Message
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.

https://github.com/fiendish/aardwolfclientpackage
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


9,616 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.