   // if the file is available, write to it:
   if (dataFile) {
     dataFile.print(data);
+    dataFile.print(", ");i
     dataFile.close();
     // print to the serial port too:
   }

sensors_vec_t   orientation;
//data buffer for the accel and orientation readings
char dataArray[80];
void initAccel()
{
  if(!accel.begin())

  accel.getEvent(&accel_event);
  if (dof.accelGetOrientation(&accel_event, &orientation))
  {
    sdWrite((String)accel_event.acceleration.x);
    sdWrite((String)accel_event.acceleration.y);
    sdWrite((String)accel_event.acceleration.z);
    sdWrite((String)accel_event.orientation.roll);
    sdWrite((String)accel_event.orientation.pitch);
    sdWrite((String) accel_event.orientation.heading);
    sdWriteNewline();
  }
}
