 #define btnLEFT   3
 #define btnSELECT 4
 #define btnNONE   5
-
-int buttonreaddone;
+//Menu System
+#define MENU_LENGTH 4
+char* mMenu[]={"Show Position", "Add Way Point", "Delete Way Point",
+"Clear Way Points"};
+int mMenuPosition = 0;
 
 #define led 13
 int x4=0;

    } 
  }

  void gpsdump(TinyGPS &gps){
    long lat, lon;
    unsigned long age, date, time, chars;
    unsigned short sentences, failed;
  
    feedgps(); // If we don't feed the gps during this long routine, we may drop characters and get checksum errors
  
    gps.f_get_position(&flat, &flon, &age);
    Serial.print("Lat/Long(float): "); printFloat(flat, 7); Serial.print(", "); printFloat(flon, 7);   // print our current posistion
    Serial.print(" Fix age: "); Serial.print(age); Serial.println("ms.");
    feedgps();
  
    gps.stats(&chars, &sentences, &failed);
    Serial.print("Stats: characters: "); Serial.print(chars); Serial.print(" sentences: "); Serial.print(sentences); Serial.print(" failed checksum: "); Serial.println(failed);
    if(buttonreaddone!=5){
      buttonread();
    }
    if(buttonreaddone==5){
      distance();
    }
  }
  
  bool feedgps(){
    while (mySerial.available())
    {
      if (gps.encode(mySerial.read()))
        return true;
    }
    return false;
  }
  
//------------------------------below is the part of the code where everything is calculated

   return btnNONE;  // when all others fail, return this...
  }

