After some more poti testing my Analog Ins are doing fine. I wanna give the accelerometer another shot.
Im using ADXL335.
The setup is simple. I have VCC connected 3.3V on my Arduino, GND as usual, and the analog inputs X,Y,Z on A0,A1, A2.
The Code is the most straigh-forward approach.
int X = 0;
int Y = 0;
int Z = 0;
void setup() {
Serial.begin(9600);
}
void loop() {
X = analogRead(A0);
Y = analogRead(A1);
Z = analogRead(A2);
Serial.print(X);
Serial.print(" ");
Serial.print(Y);
Serial.print(" ");
Serial.println(Z);
delay(500);
}
I've tried different codes I found on the net. I see no change of values, when I tilt or move.
Is my ADXL not working? Or am I doing things right.