Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Average interference with I2C ? #4

Open
samtal opened this issue Jan 25, 2015 · 1 comment
Open

Average interference with I2C ? #4

samtal opened this issue Jan 25, 2015 · 1 comment

Comments

@samtal
Copy link

samtal commented Jan 25, 2015

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:

include "PID_v1.h"

include "Wire.h"

include "Streaming.h"

include "EEPROM.h"

include "LiquidCrystal.h"

include "Average.h"

@webguy16
Copy link

I doubt it's this library, i use it with an i2c ph meter and lcd screen without errors... I would re-download the library and then check your code and triple check your actual circuit wiring and your pullups on the i2c lines...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants