GPSbee and Seeeduino stalker, how to?

Hey,

I’m trying to get a seeeduino stalker v2.1 to work with a GPSbee. If I use this code:

[code]int led = 8;

void setup() {
Serial.begin(9600);
}

void loop() {
if (Serial.available() > 0) {
// read the incoming byte:
digitalWrite(led,HIGH);
}
delay(1000);
}[/code]
there are no problems, the LED lights up when I disconnect the stalker from my PC.
But when I try to analyse the date the GPSbee should send using TinyGPS, and print this data on an SD-card, I get useless stuff (only 0’s and 9’s, for example). What should I do? Has anybody got some simple code for me test with?

Thank ahead!

Try to use this code, upload to your Stalker V2.1 and connect to GPSBee.It could be word.

#include <SD.h>

const int chipSelect = 10;
String buffer = “”;
unsigned char ptr;
File myFile;
byte val;
void setup()
{
Serial.begin(19200);
pinMode(chipSelect,OUTPUT);
if(!SD.begin(chipSelect))
{
return;
}
File myFile = SD.open(“data.log”,FILE_WRITE);
myFile.close();
}

void loop()
{
if(Serial.available() > 0)
{
val = Serial.read();
buffer = String(val);
myFile = SD.open(“data.log”,FILE_WRITE);
myFile.print(buffer);
myFile.close();
}
}

Hey, thanks for the quick reply!
I just uploaded the code, and put the Stalker (with battery attached to it!) next to a window. There is a file created on the card, but in it is only a lot of gibberish. It seems like a baudrate problem to me, although I am really not at home with this stuff. Could you please help me some more??

Thanks,
Koen

Nevermind, I just changed the baudrate in Serial.begin to 9600, and now it print some sort of NMEA string:
$GPRMC,V,N53
$GPVTG,N
30
$GPGGA,0,00,99.99,48
$GPGSA,A,1,99.99,99.99,99.99
30
$GPVTG,V,$GPRMC,V,N53
$GPVTG,9S9
G$GPRMC,V,N
53
$GPVTG,
,97$GPRMC,V,N*53

are the first couple of strings printed. The rest is somewhat similar. What does this mean? Does the GPSbee not have a fix?
Thanks!

The code is communication protocol, you can search at Google to learn how to use.

Hi again!

I now somewhat understand what these strings mean. But I’d like to get a useful output out of them, using something like the TinyGPS library, so I can easily print the information I need (lat, long, time etc.) on the SD card.
Also, these strings are not valid, and most information is unavailable. I tested these with the Stalker and GPSbee next to a window, where I believe they should be able to find satellites. Is there any way to check if they are in range of satellites? The light on GPSbee is steady red, if that is any help to you.

Thank you very much for your help!