 float sensorReading5 = 0.00;
 float sensorReading6 = 0.00;
 float sensorReading7 = 0.00;
+float sensorReading8 = 0.00;
 File sensorData;
 
 void setup()

}

void loop(){
  int A0 = analogRead(0);
  sensorReading1 = A0;
  sensorReading1 = (sensorReading1 * 5.0) / 1023.0;
    //Begin IMU data collection
    // Update the sensor values whenever new data is available
  if ( imu.gyroAvailable() )

  
  if ((lastPrint + PRINT_SPEED) < millis())
  {
    sensorReading3 = imu.calcGyro(imu.gx);
    sensorReading4 = imu.calcGyro(imu.gy);
    sensorReading5 = imu.calcGyro(imu.gz);
    //accel readings
    sensorReading6 = imu.calcAccel(imu.ax);
    sensorReading7 = imu.calcAccel(imu.ay);
    sensorReading8 = imu.calcAccel(imu.az);
    
    
    lastPrint = millis(); // Update lastPrint time
  }
  // build the data string
  dataString = String(sensorReading1) + "," + String(sensorReading2) + "," + String(sensorReading3) + "," + String(sensorReading4) + "," + String(sensorReading5) + "," + String(sensorReading6) + "," + String(sensorReading7) + "," + String(sensorReading8) + ","; // convert to CSV
  saveData(); // save to SD card
  //delay(60000); // delay before next write to SD Card, adjust as required
}
