Hi All. An Arduino newbie here.
I have an issue with my ADXL335 accelerometer while running the sketch. It worked totally normal since I first built it a few weeks ago.
Since yesterday, I noticed that the 'z' values jump from around 350 ( which is the normal steady state value while it is lying on the table ) to around 1000 or 1500 or even more; randomly. This happens even if I am not touching it.
Upon further investigation, I noticed that even when I very very very gently touch the wires going from the Arduino to the ADXL335, the z value jumps to these aforementioned really high values.
I also noticed that when I wiggle my finger an eighth of an inch away from the sensor without even touching it, the numbers jump high also.
I would appreciate any feedback.
#include "ADXL335.h"
ADXL335 accelerometer;
void setup() {
Serial.begin(9600);
accelerometer.begin();
}
void loop() {
float x, y, z;
accelerometer.getXYZ(&x, &y, &z);
Serial.println(z);
}
