Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, 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.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ Area Editor
➜ Bug reports
➜ Wire.requestFrom correction on webpage
Wire.requestFrom correction on webpage
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Skippy
(1 post) Bio
|
Date
| Thu 27 Aug 2015 08:39 PM (UTC) |
Message
| Hello,
Thanks for your site! It is very useful.
I was learning about Wire.requestFrom() from your discussion/posts.
On the page
http://gammon.com.au/forum/?id=10896#i2csummary
About in the middle it says
Quote:
Therefore the only reasonable way of doing the Wire.requestFrom is:
But the example after that appears to have the logic reversed. "handle error" would occur if zero was returned, but your condition is not... notted?
Or just swap the comments and its good.
Or maybe I'm totally confused!
Thanks,
Skippy | Top |
|
Posted by
| Nick Gammon
Australia (23,162 posts) Bio
Forum Administrator |
Date
| Reply #1 on Fri 28 Aug 2015 04:25 AM (UTC) |
Message
| You are right, I got that backwards when doing the summary. I changed to compare to zero to make it clearer.
Thanks for letting me know! |
- 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.
12,946 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top