unstable accelerometer

Hi,

Shoot me if I am wrong, but if your are reading each axis one after the other, won't there be an error component due to switching analog inputs ? In which case a immediate improvement would be to take a dummy reading from each input and discard it before taking the reading you intend to use ?

i.e.

read zaxis and discard
read zaxis for stable reading
read xaxis and discard
read xaxis for stable reading
read yaxis and discard
read yaxis for stable reading

All the other comments re filtering still apply, but my understanding is that errors on analogReads immediatley following a change in the pin being read are an expected feature of Arduino and that dummy readings should be take to allow the new input to stabilise

Duane B

rcarduino.blogspot.com