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
➜ Electronics
➜ Microprocessors
➜ bug in I2C_Anything.zip
Postings by administrators only.
Refresh page
Posted by
| Brian J. Murrell
(3 posts) Bio
|
Date
| Fri 26 Jan 2018 05:42 PM (UTC) Amended on Fri 26 Jan 2018 05:54 PM (UTC) by Brian J. Murrell
|
Message
| Hi. I was most interested in your I2C_Anything implementation.
There does seem to be a meaningful discrepancy between what you wrote in your forum post at http://www.gammon.com.au/forum/?id=10896&reply=8#reply8 and what is in the library download you provide at the bottom of that post.
In the post, I2C_writeAnything() writes using:
Wire.write((byte *) &value, sizeof (value));
and in the library it writes using:
for (i = 0; i < sizeof value; i++)
Wire.write(*p++);
Of course, you cannot use Wire.write() more than once in an
Wire.onRequest() event handler. The post reflects that but the library download needs updating to reflect that particularly since the download is likely what a significant number of people are going to use to get your templates.
Great work on those. Really happy to see your PR to the official project to get them included as part of the official Wire library. | Top |
|
Posted by
| Nick Gammon
Australia (23,070 posts) Bio
Forum Administrator |
Date
| Reply #1 on Fri 26 Jan 2018 09:53 PM (UTC) |
Message
| |
Posted by
| Brian J. Murrell
(3 posts) Bio
|
Date
| Reply #2 on Fri 26 Jan 2018 09:58 PM (UTC) |
Message
| Ahh. Great. I looked for the library there before posting here but saw that it was not on your GitHub account.
And I see that you've already fixed the problem there but not in the copy that's at the link that is in the Forum post:
http://www.gammon.com.au/forum/?id=10896&reply=8#reply8
which is still going to lead people to installing a broken version of the library. | Top |
|
Posted by
| Nick Gammon
Australia (23,070 posts) Bio
Forum Administrator |
Date
| Reply #3 on Fri 26 Jan 2018 10:01 PM (UTC) |
Message
|
Ah I see what you mean. The post was correct but the download was wrong. I've changed the download link to be the GitHub page which was the correct code (you can see the history in the commit history). |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Nick Gammon
Australia (23,070 posts) Bio
Forum Administrator |
Date
| Reply #4 on Fri 26 Jan 2018 10:04 PM (UTC) |
Message
| Thanks for the heads-up. :) |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | 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.
18,187 views.
Postings by administrators only.
Refresh page
top