Seeed-Studio / Grove_BMP280

MIT License
7 stars 11 forks source link

No need to wait for data after Wire.requestFrom() #1

Open Koepel opened 8 years ago

Koepel commented 8 years ago

When the Wire.requestFrom() returns, the I2C transaction has completely finished and the received data is in the receive buffer in the Wire library. There is no need to wait for something.

When there was a I2C bus error or I2C collision, the Wire.requestFrom() will probably return with no data. In that case, the while-loop will halt the sketch.

KillingJacky commented 8 years ago

Hi @Koepel , thanks for your percipience. If you like, could you please commit your patch for this driver with a pull-request? That prevents us reinvent the wheel and would be pretty appreciated.

ackPeng commented 6 days ago

@Koepel Thank you very much for your suggestions. Do you have any questions? If you have any suggestions, please help us submit a PR.