m5stack / M5-ProductExampleCodes

All example codes of products supplied by M5Stack have been collected in this reposity.
MIT License
339 stars 484 forks source link

No need to wait after Wire.requestFrom(). #16

Open Koepel opened 5 years ago

Koepel commented 5 years ago

In the files:

there is waiting after a Wire.requestFrom(). You may remove all these lines: while (Wire.available() < 1) delay(1);

In the files:

there is a delay after the Wire.requestFrom(). That is delay is not needed for interfacing with the Wire library.

In the file:

you may remove this line: while (Wire.available() < 1);

Explanation: Common-mistakes#1