GPS and sensor data logger only works when connected to serial connection

How does it look?

Awful.

  digitalWrite(led, LOW);                              
  delay(300);
  digitalWrite(led, HIGH);
  delay(300);
  digitalWrite(led, LOW);
  delay(300);
  digitalWrite(led, HIGH);
  delay(300);
  digitalWrite(led, LOW);
  delay(300);
  digitalWrite(led, HIGH);
  delay(300);
  digitalWrite(led, LOW);
  delay(300);
  digitalWrite(led, HIGH);

Haven't you heard of for loops?

Random indenting sucks. Tools + Auto Format will fix that in no time flat.

  gps.f_get_position(&flat, &flon, &age);           //Assign value to flat, flon, and age by calling TinyGPS function
  gps.get_datetime(&date, &time);                   //Assign value to date and time by calling TinyGPS function
  speedmps = gps.f_speed_mps();                     //Assign value to speedmps by calling TinyGPS function
  satellites = gps.satellites();                    //Assign value to satellites by calling TinyGPS function
  altitude = gps.f_altitude();                      //Assign value to altitude by calling TinyGPS function
  course = gps.course();                            //Assign value to course by calling TinyGPS function

Do these comments REALLY add any value? Anyone who has ever written a line of code will recognize what the code is doing. The signal to noise ratio is far to low.