     h=255;    f=255;
   }
 
+  // ********** KEEP TRACK OF HOW MANY RECORDINGS WE'VE TAKEN *********
+  num_records++;
+
 #ifdef DEBUG
   Serial.print("Time to read sensors(ms): ");
   Serial.println(millis() - read_start);
-#endif
-
+  Serial.flush();
+#endif
+
+
+#ifdef DEBUG
   // **************** log data to serial output ****************
-  
-#ifdef DEBUG
-
+
+    Serial.print("Rec. # ");    Serial.print(num_records);  Serial.print('\t');
+    
     Serial.print(now.month());  Serial.print('/');
     Serial.print(now.day());    Serial.print('/');
-    Serial.print(now.year());   Serial.print(' ');
+    Serial.print(now.year());   Serial.print('\t');
     Serial.print(now.hour());   Serial.print(':');
     Serial.print(now.minute()); Serial.print(':');
     Serial.print(now.second()); Serial.print('\t');
 
-    Serial.print(flat, 6); Serial.print(" ,");
-    Serial.print(flon, 6); Serial.print(' ');
-    
-    Serial.print("\tSharp value: ");         Serial.print(sharp_dust_val);
-    Serial.print("\tGrove Concentration: "); Serial.print(concentration);
-    Serial.print("\tCO: ");                  Serial.print(gasLevel);
-    Serial.print("\tHumidity: ");            Serial.print(h);
-    Serial.print("\tTemp: ");                Serial.println(f);
+    Serial.flush();
+    
+    Serial.print(flat, 6); Serial.print('\t');
+    Serial.print(flon, 6); Serial.print('\t');
+    
+    Serial.flush();
+    
+    Serial.print("\tSharp: ");         Serial.print(sharp_voltage);
+    Serial.print("\tGrove: ");         Serial.print(concentration);
+    if(heaterInHighPhase)
+      Serial.print("\tCO heat: ");
+    else
+      Serial.print("\tCO read: ");
+    Serial.print(gasLevel);
+    Serial.print("\tHumidity: ");      Serial.print(h);
+    Serial.print("\tTemp: ");          Serial.println(f);
+    
     Serial.flush();
 #endif
 
   
   // **************** WRITE TO SD CARD ****************
 #ifdef DEBUG
-  Serial.println("Logging a record to SD"); 
+  Serial.println("Logging to SD");
+  Serial.flush();
 #endif
 
   myFile = SD.open(file_name.c_str(), FILE_WRITE);
 
-#ifdef DEBUG 
-  if (myFile) {
-    Serial.println("File open");
-  } else {
+/* #ifdef DEBUG 
+  if (!myFile) {
     Serial.println("Error opening SD file. Record not logged.");
+    Serail.flush();
     return;
   }
 #endif
-
-  // gps
-  myFile.print(flat,6); myFile.print('\t');
-  myFile.print(flon,6); myFile.print('\t');
-  // altitude, speed?
-  
+*/
+
+  // record number
+  myFile.print(num_records); myFile.print('\t');
+
   // date and time
   myFile.print(String(now.month()).length()==1 ? String('0') + String(now.month()) : now.month() );
   myFile.print('/');
   myFile.print(String(now.day()).length()==1 ? String('0') + String(now.day()) : now.day() );
   myFile.print('/');
   myFile.print(now.year());
-  myFile.print(' ');
+  myFile.print('\t');
   myFile.print(String(now.hour()).length()==1 ? String('0') + String(now.hour()) : now.hour() );
   myFile.print(':');
   myFile.print(String(now.minute()).length()==1 ? String('0') + String(now.minute()) : now.minute() );
   myFile.print(':');
   myFile.print(String(now.second()).length()==1 ? String('0') + String(now.second()) : now.second() );
   myFile.print('\t');
-  
+
+  // gps
+  myFile.print(flat,6); myFile.print('\t');
+  myFile.print(flon,6); myFile.print('\t');
+  // altitude, speed?
+
   // sharp sensor value
-  myFile.print(sharp_dust_val); myFile.print('\t');
+  myFile.print(sharp_voltage); myFile.print('\t');
 
   //  grove sensor value
   myFile.print(concentration);  myFile.print('\t');
 
   // MQ7 CO sensor value
-  myFile.print(gasLevel);
-  if(heaterInHighPhase)
-    myFile.print(" (H)");
+   if(heaterInHighPhase) {
+    myFile.print("--\t");
+    myFile.print(gasLevel);
+  } else {
+    myFile.print(gasLevel); myFile.print('\t');
+    myFile.print("--");
+  }
   myFile.print('\t');
   
   
-  // DHT22 sensor value
+  // DHT22 sensor values
   myFile.print(h);  myFile.print('\t');
   myFile.print(f);  myFile.println();
   myFile.close();
-
-  // Update how many records we have
-  num_records++;
-
-#ifdef DEBUG
-  Serial.print(" Num records: "); Serial.println(num_records);
-#endif
-
-} //ReadSensors // ISR
-
+  
+
+} // ReadSensors()
+

#ifdef DEBUG
    Serial.print("Time since last reading: ");
    Serial.println(millis() - sensors_read_time_start);
#endif

  if( (millis() - sensors_read_time_start) > SENSORS_READ_TIME ) {

  unsigned long chars;
  unsigned short sentences, failed;
#endif 
  
  // For one second we parse GPS data and report some key values
  for (unsigned long start = millis(); millis() - start < 1000;) {
