technoblogy / tiny-i2c

Minimal I2C master routines for all AVR microcontrollers.
161 stars 39 forks source link

Bugfix: read failed due to missing parenthesis #4

Closed maxint-rd closed 5 years ago

maxint-rd commented 5 years ago

See issue #3 at master git.

The original code compiled fine (Arduino IDE 1.8.2) but unfortunately it wouldn't read the I2C RTC. Using a logical analyzer I saw that while the initial time setting (taken from the example code) went okay, reading the time failed. The code on line 61 differs just a tiny bit from the similar code on line 83. It seems that parenthesis were missing. I put them back and now everything worked fine!

maxint-rd commented 5 years ago

Okay, I see I can close this pull request too. I merged differences and closed it.