-
Notifications
You must be signed in to change notification settings - Fork 48
Description
Hello,
I recently found the Average class, and decided to try it out (to make my long program look shorter and easy to maintain).
It seem to have several nice features that I can use with thanks.
I replaced my several self built moving average (runs nicely, but not proof) with the Average class 'rolling' in several locations within my Arduino Mega.
Unfortunately, while it compiles nicely, in actual run with the Arduino I receive I2C "read nack on transmit of address". This error is also shown with previous version of my program that does not use the Average, and has no Average include, but problem is gone if I remove the Average.h file from the Arduino library.
In simple words: The pretense alone of the class Average (with the Wire class??) cause the problem
To me, analysis of the problem seems quite complex, thus before trying going deep into it (or abandoning the Average), I prefer asking the 'Average' experts.
Looks like there is some interference of the Average class and the Wire even if the Wire is not included, but is present in the lib. (There are unfortunately several versions of Wire)
I wonder why use 'get' and 'push' as Average commands, while those two words are common keywords that are used internally with many programs. Can this be the reason?
Here are my includes: