GPSbee

Hi,

I am currently working on a project with a GPSbee and I wasn't able to find good example and explanation on how should I read the values of this device. The chip on it is a NEO-6M.
This is the result I am getting: http://imgur.com/a/9ZDdQ

With u_center program, it seem to work but on the arduino IDE, it is just a mess of values. Currently this is my sketch:

/*-------------------------------------*/
/* GPS Bee Test Script                 */
int ledPin = 13;                  // LED test pin
int byteGPS=-1;

void setup() {
  // initialize serial communication:
  Serial.begin(9600);
  // initialize the LED pins:
  pinMode(ledPin, OUTPUT);
}

void loop() {
  
   digitalWrite(ledPin, HIGH);    // check if script works
   byteGPS=Serial.read();         // Read a byte of the serial port
   Serial.write(byteGPS);
   //Serial.write("\n"); 
   digitalWrite(ledPin, LOW);    // check if script works
}

So the question is: How can I separate all those values and store them in different variables?? Like longitude, lattitude...etc.

If some people have already worked with this device, sample code would be welcomed

What did Mr Google tell You? I'd Hate to duplicate your search...

This is the result I am getting: http://imgur.com/a/9ZDdQ

Which looks perfectly reasonable.

it is just a mess of values.

I guess that's another interpretation.

So the question is: How can I separate all those values and store them in different variables?? Like longitude, lattitude...etc.

First you have to collect them all in a container. All you are doing now is getting a character from the GPS and sending it to the serial port. When you get the character that indicates the end of a GPS sentence, you have nothing to parse.

Step 1 is to fix that.

You might consider using TinyGPS to do the data collection and parsing, instead, if what you see is "just a mess of values".

Docedison:
What did Mr Google tell You? I'd Hate to duplicate your search...

Trust me, I searched for 3 hours, made a lot of tests. My question was how to separate the data in variables....there is really few examples out there.

Thanks PaulS for TinyGPS link.

there is really few examples out there.

There are tons of examples of parsing data. There are tons of examples of collecting serial data into arrays. There are very few that expect to have to hold your hand on both topics.

I know how to put serial data into array and everything, but even in my GPS datasheet, they doesn't explain how the data comes out.

How many byte are we suppose to read at a time?
Why does reading (serial.read()) into an int give me all this data, including floatinf point??

I know how to put serial data into array and everything, but even in my GPS datasheet, they doesn't explain how the data comes out.

You can see that from your picture. A sentence starts with a $ and ends with a *. The characters following the * are the checksum, which you can generally ignore.

How many byte are we suppose to read at a time?

All that Serial.read() can return. That is, one.

Why does reading (serial.read()) into an int give me all this data, including floatinf point??

I'd suggest that you change

   Serial.write(byteGPS);

to

   Serial.println(byteGPS);

and answer that question yourself.

The GPS data is NOT binary data, so write() is not the correct method to output it.