boolean OK=false
   String trame;
 
 void loop() { 
    if (Serial.available()){
      a = Serial.read();
      trame+=String(char(a));
      if (trame.indexOf("$GPRMC")>0 && !OK) {
          t0=millis();
          OK =true;}
      gps.encode(a);   // Si TinyGPS a découvert une nouvelle trame, afficher les coordonnées      
          }
                 
 if (millis()-t0>200 && OK) {
   lireGPS();
   Serial.print(trame);
   ecrireSD();
   trame="";
   OK=false;}   
  }
    }