Wire.requestFrom() should not be followed by Wire.endTransmission() in Qduino.cpp
Koepel opened this issue · 2 comments
Koepel commented
In the files:
- Arduino_Boards/sparkfun/avr/Qduino/Qduino.cpp
- Arduino_Boards/sparkfun/avr/libraries/Qduino/Qduino.cpp
in the function "readFrom()", the Wire.requestFrom() is followed by a Wire.endTransmission(). That Wire.endTransmission() may be removed. It is at the moment at line 284 (for both files).
Explanation: Common-mistakes#2
loricrotser commented
Reviewed and committed. If you get a chance to double check, it'd be appreciated. Thank you!
Koepel commented
It is okay.
When the sensor is not connected, the readFrom() does not fill the lsb and msb parameters. Thus those values will keep their default value which is set to zero before calling readFrom(). That is a good way to deal with a sensor that might not be connected.