Hello.
Me again!

I have been playing around with an acclerometer (ADXL335). The program is below
//----------------------------------------------------//
//Analog read pins, reads from the 3 axis
const int x = 0;
const int y = 1;
const int z = 2;
//Variables for holding values for each axis
int accelx, accely, accelz;
void setup()
{
Serial.begin(9600);
pinMode(x, INPUT);
pinMode(y, INPUT);
pinMode(z, INPUT);
}
void loop()
{
//Read the analog values from the accelerometer
accelx = analogRead(x);
accely = analogRead(y);
accelz = analogRead(z);
//Print out values
Serial.print(accelx);
Serial.print("\t");
Serial.print(accely);
Serial.print("\t");
Serial.print(accelz);
Serial.println();
delay(2000);
}
And, the data I get while it is sitting on my desk is
x y z
403 332 343
403 332 343
402 332 343
403 331 343
And so on.
But what does this data mean, and how do I change it to acceleration?
I have been told, since my accelerometer is a 3g accelerometer, when I move it in, say, the x direction, the numbers should go one to about a third of 1023. I this correct? And, when I do move it in that direction, it goes to 339. So that theory holds.
Thanks in advance.
Seán