Problems with NewSoftSerial and GPS

Hi,
I just buyed a Venus GPS Modul. I tryed it, and it works, but now I want to work with the GPS Data. The GPS Sends in NMEA. Here is the code.

#include <NewSoftSerial.h>

NewSoftSerial gps(2,3);

char in[100];
char last;
char check;

void setup(){
  Serial.begin(115200);
  Serial.println("Ready...");
  
  gps.begin(9600);
}

void loop(){
  int i=0;
  if((gps.read()=='

I want to read the GPRMC Data. But I don’t works.
The programm is supposed to check, if the first letters are $GPRMC and then it shall the next information in the array in.
Can you help me?
I connect the GPS RX pin to Arduino Pin 3 and the TX to Arduino Pin 2.
But I tryed it booth ways.

Philipp)&&(gps.read()==‘G’)&&(gps.read()==‘P’)&&(gps.read()==‘R’)&&(gps.read()==‘M’)&&(gps.read()==‘C’)){
   while(last!=’


I want to read the GPRMC Data. But I don't works.
The programm is supposed to check, if the first letters are $GPRMC and then it shall the next information in the array in[].
Can you help me?
I connect the GPS RX pin to Arduino Pin 3 and the TX to Arduino Pin 2.
But I tryed it booth ways.

Philipp){
      last=gps.read();
      in[i]==last;
      i++;
    }
  }
  for(int i=0;i<100;i++){
    Serial.print(in[i]);
  }
  Serial.println("\n");
}

I want to read the GPRMC Data. But I don’t works.
The programm is supposed to check, if the first letters are $GPRMC and then it shall the next information in the array in.
Can you help me?
I connect the GPS RX pin to Arduino Pin 3 and the TX to Arduino Pin 2.
But I tryed it booth ways.

Philipp

A forum search for "GPS" will locate a lot of previous discussions. If the GPS unit continously spews data, then you will need to collect a string that is long enough to capture all the the data desired. The below question seems similar to yours.

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1276221442

look up the tinyGPS library.

Should help you :slight_smile:

Mowcius