// Define the pins we're going to call pinMode on int sensorPin1 = A0; // analog pin 0 int sensorPin2 = A1; // analog pin 1 int sensorPin3 = A2; // analog pin 2 int sensorValue1 = 0; // variable to store the X axis value coming from the accelerometer int sensorValue2 = 0; // variable to store the Y axis value coming from the accelerometer int sensorValue3 = 0; // variable to store the Z axis value comimg from the accelerometer // This routine runs only once upon reset void setup() { Serial.begin(115200); // send data over serial to SD card } void loop() { // read the value from the sensor: sensorValue1 = analogRead(sensorPin1); // x axis sensorValue2 = analogRead(sensorPin2); // y axis sensorValue3 = analogRead(sensorPin3); // z axis // print the results to the serial monitor: Serial.print(millis()); // time in milliseconds Serial.print(','); Serial.print(sensorValue1); // x axis value Serial.print(','); Serial.print(sensorValue2); // y axis value Serial.print(','); Serial.println(sensorValue3); // z axis value }