adafruit / Adafruit_BMP280_Library

Arduino Library for BMP280 sensors
253 stars 186 forks source link

Wire.endTransmission after Wire.requestFrom is not okay. #1

Closed Koepel closed 8 years ago

Koepel commented 9 years ago

In two places there is a Wire.endTransmission after a Wire.requestFrom. The Wire.requestFrom is a complete I2C transmission on its own, it should not be followed by a Wire.endTransmission. The Wire.endTransmission transmits the bytes in the buffer that are written with Wire.write and waits until the I2C transmission (to write date) has finished.