 
 
 
-char* dynamic_array_Serial(SoftwareSerial*,int);
+char* dynamic_array_Serial(SoftwareSerial*,int,char,char);
 //----------------------------Setup Code-----------------------------------------------//
 void setup() {
 	pinMode(MOTOR_1_PIN, OUTPUT);

  while(src.available()>0){//Cant go into this loop
    char temp=src.read();
    delay(20);
    if(temp!='*'){
      max_array[array_length-1]=temp;
      array_length++;
      //Serial.println(max_array[array_length-1]);

void loop() {
  // put your main code here, to run repeatedly:
  char* gpsbuffer;
  gpsSerial.listen();
// Initialize buffer for gps data
/*  Serial.println("Try to communicate");
  Serial.print("Buffer size: ");
  Serial.println(gpsSerial.available());
  Serial.print("First byte in buffer: ");
  Serial.println(gpsSerial.peek());
  Serial.println(gpsSerial.available());*/
  //Serial.println(gpsSerial.read());
  //Serial.println("Waiting for buffer to be filled");
 //	if (gpsSerial.available() > 0){
   gpsbuffer=dynamic_array_Serial(gpsSerial,100,'$','*');
   Serial.println("Succeed in loading buffer with data");
   Serial.println(array_length);
   //Serial.print(gpsbuffer[0]);
   /* while (!(gpsSerial.findUntil("$GPRMC,",'*'))){
