//March 24th, 2013 #include #include /*************************************************** /MINDS-i Calibration. mymindsi.com / /Accelerometer Calibration / /This Accelerometer Calibration code is used to test /and adjust your accelerometer as well as to establish /the measurement that it’s reading. Because each sensor /varies, this calibration is necessary before applying /it in your code to avoid malfunctions. / /To learn more about this accelerometer visit: /http://www.freescale.com/files/sensors/doc/data_sheet/MMA7260QT.pdf / /***************************************************/ float X,Y,Z; void setup() { Serial.begin(9600); //start a serial connection } void loop() { X = analogRead(A0); //read in the value on analog pin 0 Y = analogRead(A1); Z = analogRead(A2); Serial.print("X:"); //send a string or value on the serial connection Serial.print(X); Serial.print(" Y:"); Serial.print(Y); Serial.print(" Z:"); Serial.println(Z); }