Go Down

Topic: Checking every Wire.endTransmission() error is trivial ? (Read 339 times) previous topic - next topic

Koepel

Since Github is flooded with code that uses the Arduino Wire library in the wrong way, I'm writing a wiki to explain the common mistakes: https://github.com/Koepel/How-to-use-the-Arduino-Wire-library/wiki
That way I can simply put a link in a issue that points to a certain mistake.

In this page at the bottom I bluntly say that checking every error after every use of the I2C bus is kind of useless: https://github.com/Koepel/How-to-use-the-Arduino-Wire-library/wiki/Check-for-bus-errors.

Do you agree ? Did someone ever had any benefit of checking everything ?

robtillaart

#1
Mar 24, 2018, 05:50 pm Last Edit: Mar 24, 2018, 05:50 pm by robtillaart
+1

please add a tale about the internal buffer size - default 32 ? and one is used for length IIRC.
So ~30 bytes is the max one can request.

Link to Nick Gammons I2C page might be useful too.
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Koepel

Thanks! and fixed.

The full 32 bytes can be used since a number of years, as far as I know.
The SAMD had a 64 byte buffer, but when I looked into it, it was changed to 256 two months ago.

robtillaart

The full 32 bytes can be used since a number of years, as far as I know.
The SAMD had a 64 byte buffer, but when I looked into it, it was changed to 256 two months ago.
Things change so fast :)
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Go Up