sparkfun / Arduino_Boards

Board definitions for SparkFun-manufactured AVR, ARM, and ESP-based Arduino boards.
270 stars 125 forks source link

Usage of Wire library in master_reader.ino #49

Closed Koepel closed 4 years ago

Koepel commented 5 years ago

In the file "Arduino_Boards/sparkfun/samd/libraries/Wire/examples/master_reader/master_reader.ino", the reading and writing with the Wire library is mixed in the "master" branch. The comment in the line with the Wire.requestFrom() is also wrong. See also my alternative explanation of the functions of the Wire library.

What is the source/origin of that file ? There are many "master_reader.ino" files, but I can't find this one.

The bug is only in the "master" branch. I don't know if the other versions are newer.

edspark commented 4 years ago

Yeah these I2C examples are...suspect to say the least, I have updated the one in this issue in the latest commit, but the others will have to be either updated or removed all together. Thanks for the issue!

Oh and I'm not sure where the source of these examples - they are quite old at this point.