样例程序是这样的:
float zero_G = 512.0; //ADC is 0~1023 the zero g output equal to Vs/2 //ADXL335 power supply by Vs 3.3V
float scale = 102.3; //ADXL335330 Sensitivity is 330mv/g //330 * 1024/3.3/1000
Serial.print(((float)x - zero_G)/scale);
应该是512代表0加速度。模拟口返回的值大概是对称的,1到1023吧。