I have a fairly simple circuit consisting of an arduino an accelerometer and an amplifier. I am collecting data from the accelerometer using I2C and playing some sounds through a switching amplifier (this). The problem is I am getting a constant noise in the background. I am 90% sure it is because of the I2C connection between the accelerometer and the arduino.
I am using an inductor of 10mH and cap 100nF The amplifier is connected across the capacitor and is receiving power from arduino 5 volt supply. (I didn't draw it here). Also, I am not using external pull-up resistors with the accelerometer because apparently I don't need to when working with adxl 345
How can I reduce this noise? Where is it coming from?
Edit :-
My code has if else statements that play sounds if the accelerometer value is above a threshold. I think the noise has something to do with the fact that I am polling the accelerometer all the time.