Open grossadamm opened 8 years ago
Also pulled in @clik86's work
@grossadamm Have you investigated how the Wire library works ? Are you willing to remove this Pull Request with the timeout ? I have made a Wiki with common mistakes: https://github.com/Koepel/How-to-use-the-Arduino-Wire-library/wiki/Common-mistakes
it should also handle the case where the millis resets after 50 days or so.
Adds ability to have a timeout in seconds in the constructor for use in the
read
function during the never ending while loop. This new param is not required.A best effort of backwards compatibility is used by setting the default timeout to be 120 seconds. Which is far longer than most hobbyists will wait :smile:.