GPS Bee and Stalker 2.0

Hello,

I’m not able to receive data from a Gps Bee using a Seeduino Stalker 2.0.

Is there any code snippet somewhere?

Thanks.

Marco

Have you tested it by U-Center? Or using the UartSB to see if you can receive the data on PC.

Thanks for the reply!

I’m able to obtain data from the gps, and the first time I’ve tried with U-center, using uartSB and your xbee shield. For example, I have nmea strings using this code:[code]/*
Program that read a char from serial port and turn on a led (pin 13)
if the char was H. Put it low is the char is an L
*/

/* parallax code */

//int ledPin = 13;
char string[32];
char byteRead;

int ledPin = 13; // LED test pin
int rxPin = 0; // RX PIN
int txPin = 1; // TX TX
int byteGPS=-1;
char linea[300] = “”;
char comandoGPR[7] = “$GPRMC”;
int cont=0;
int bien=0;
int conta=0;
int indices[13];
/------------------------------------/

void setup() {
// initialize serial communication:
Serial.begin(9600);
/* parallax code */
for (int i=0;i<300;i++){ // Initialize a buffer for received data
linea[i]=’ ';
}
// initialize the LED pins:
pinMode(ledPin, OUTPUT);
}

void loop() {

digitalWrite(ledPin, HIGH);
byteGPS=Serial.read(); // Read a byte of the serial port
if (byteGPS == -1) { // See if the port is empty yet
delay(100);
} else {
linea[conta]=byteGPS; // If there is serial port data, it is put in the buffer
conta++;
Serial.print(byteGPS, BYTE);

 }

}

/*

// read the port:

int availableBytes = Serial.available();
for(int i=0; i<availableBytes; i++)
{
string[i] = Serial.read();
}
Serial.print(string);
Serial.println();
} */[/code]

…and I obtain nmea data

$GPVTG,,,,,,,,,N*30 $GPGGA,,,,,,0,00,99.99,,,,,,*48 $GPGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99*30 $GPGSV,1,1,00*79 $GPGLL,,,,,,V,N*64 $GPTXT,01,01,01,NMEA unknown msg*58 $GPTXT,01,01,01,NMEA unknown msg*58 $GPTXT,01,01,01,NMEA unknown msg*58 $GPTXT,01,01,01,NMEA unknown msñü%Õ ±,V,,,,,,,,,,N*53 $GPVTG,,,,,,,,,N*30 $GPGGA,,,,,,0,00,99.99,,,,,,*48 $GPGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99*30 $GPGSV,1,1,00*79 $GPGLL,,,,,,V,N*64 $GPTXT,01,01,01,NMEA unknown msg*58 $GPTXT,01,01,01,NMEA unknown msg*58 $GPTXT,01,01,01,NMEA unknown msg*58 $GPTXT,01,01,01,NMEA unknown msñü%Õ ±,V,,,,,,,,,,N*53 $GPVTG,,,,,,,,,N*30 $GPGGA,,,,,,0,00,99.99,,,,,,*48 $GPGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99*30 $GPGSV,1,1,00*79 $GPGLL,,,,,,V,N*64 $GPTXT,01,01,01,NMEA unknown msg*58 $GPTXT,01,01,01,NMEA unknown msg*58 $GPTXT,01,01,01,NMEA unknown msg*58 $GPTXT,01,01,01,NMEA unknown msñü%Õ ±,

and this HW configuration:

Uploaded with ImageShack.us

the xbee shield has the 2 switch to the extern (right) side.

When I try to plug in the xbee slot of the Stalker, i can’t obtain nmea data, neither using the shield

You can not use the serial port to receive the GPS data as well as transmit them onto the PC.
Once you open the serial terminal on your PC, the Serial port on Arduino/Stalker is occupied by PC, so that it could not communicate with GPS Bee.
So you may need to use Software Serial port, or do not display them on PC.

Steve

My reference for the argument is this? :

arduino.cc/en/Tutorial/SoftwareSerial

…but at the end is strange that I cannot do the same thing that I’m doing with a 2009, the nmea datas that I’ve posted are taken from serial port reader of the arduino ide.

Sorry, I don’t understand what do you mean. Would you please tell us what you want to get, and how did you do that?

Ops sorry.

I would like to plug a gps bee in a Stalker 2.0 and see the nmea string printed in the serial monitor of my arduino ide.

For me is the same to plug it in the xbee slot, or using a xbee shield.

A second step wolud be connect also a xbee antenna, to make the gps data be wireless sent to the pc. But for now is enough to get the nmea and see it on the pc.

Using the xbee shield and an arduino 2009 I’m able to see the nmea string in the arduino serial monitor.

For do this, in the first step, I would like to use the Serial library (Serial.begin Serial.print ecc)

danke!

Hi,
Just as I said, it is impossible to use the serial terminal to display the GPS info from Stalker, because the Serial port on stalker has been occupied by the PC, as a result the stalker will not receive the data from GPS Bee.

Actually, the stalker can surely receive the GPS data, but it just can not display them on the terminal at the same time.

Using xBee Shield on Arduino or Stalker is another way, but you have to use the software serial library to receive the GPS info, while using the hardware serial port send the info the serial terminal on PC.

Hope this make it clear.

Steve

Ok Steve, I’ll try with that library.

Just a question, how I have to set the switch of the xbee shield to use the library and pin 11 and 12? Sometimes I’ve found “left-left” indication, sometimes “right-left”

Have a nice day!

I’m not sure if you are using the xBee shield of Seeedstudio. You can get more info on how to use it here:
http://garden.seeedstudio.com/index.php?title=XBee%C2%AE_Shield

yepz, is a seeedtudio xbee shield

I’ve tried the newSoftSerial library:

[code]#include <NewSoftSerial.h>

int RXpin = 11;
int TXpin = 12;

NewSoftSerial mySerial = NewSoftSerial(RXpin,TXpin);
int zz = 0;

void setup()
{
Serial.begin(57600); //set data rate from Arduino to PC
Serial.println(“Lets get started!”); // this prints fine.
mySerial.begin(4800); // set the data rate for the NewSoftSerial port
}

void loop()
{
if (mySerial.available() > 0) // this never triggers…
{
Serial.print((char)mySerial.read());
Serial.print(zz++);
} else {Serial.print(“no data avaible”);Serial.println();}
}[/code]

Without results.
Switches of seeedstudio xbee shield in Left-Left configuration (but I’ve tried any configuration).

…And I’m still not convinced about the unvaibility of the serial port (here with my beloved Arduino 2009):

Uploaded with ImageShack.us

What I have to do.

Thanks

You may change the baud rate to 9600, as the default baud rate of GPS Bee is 9600.

mySerial.begin(9600); // set the data rate for the NewSoftSerial port

done
Results: nothing.

The RSSI led on the xbee shied never red blinks.

Hi, I’ve tested that. It works ok here.
The arduino code is the same as you except using mySerial.begin(9600);

The two switches on xBee shield are set to right of top one and to left of bottom one.

Some of data I grabbed from the serial terminal is as following:

17739$17740G17741P17742G17743G17744A17745,17746,17747,17748,17749,17750,17751017752,17753017754017755,17756917757917758.1775991776017761,17762917763G17764$17765417766$17767G17768P17769R17770M17771C17772,17773,17774V17775,17776,17777,17778,17779,17780,17781,17782,17783,17784,17785N1778617787517788317789
17790
17791$17792G17793P17794V17795T17796G17797,17798,17799,17800,17801,17802,17803,17804,17805,17806N1780717808317809017810
17811
17812$17813G17814P17815G17816G17817A17818,17819,17820,17821,17822,17823,17824017825,17826017827017828,17829917830917831.17832917833,17834,17835,17836$17837
17838617839$17840G17841P17842R17843M17844C17845,17846,17847V17848,17849,17850,17851,17852,17853,17854,17855,17856,17857,17858N17859
17860517861317862
17863
17864$17865G17866P17867V17868T17869G17870,17871,17872,17873,17874,17875,17876,17877,178

I really don’t know how to say. Mine is not working then ("no serial data avaible"said my serial monitor).
Here a pair of picture of my system

Uploaded with ImageShack.us

Code:

[code]#include <NewSoftSerial.h>

int RXpin = 11;
int TXpin = 12;

NewSoftSerial mySerial = NewSoftSerial(RXpin,TXpin);
int zz = 0;

void setup()
{
Serial.begin(57600); //set data rate from Arduino to PC
Serial.println(“Lets get started!”); // this prints fine.
mySerial.begin(9600); // set the data rate for the //NewSoftSerial port
}

void loop()
{
if (mySerial.available() > 0) // this never triggers…
{
Serial.print((char)mySerial.read());
Serial.print(zz++);
} else {Serial.print(“no data avaible”);Serial.println();}
}[/code]

Board Settings:

Arduino Pro 3.3 v atmega 328

I really cannot understand

Or…

A) How can I use the Xbee slot with GPS Bee?

At least…

B) Can I wire the pins of the GPS Bee to go into a pair of pins of the Stalker.

Any type of help would be really appreciated.

M

At the end the problem seems to be in power supplied by the ISP.

I connect the 3v3 pin straight in to the vcc of the gps bee , and I’m able to obtain the data…

Uploaded with ImageShack.us

And with this code, if I connect an xbee in to the xbee slot of the stalker, I can send the data to the pc just using Serial.print

[code]/*
Program that read a char from serial port and turn on a led (pin 13)
if the char was H. Put it low is the char is an L
*/

/* parallax code */

//int ledPin = 13;

char string[32];
char byteRead;

int ledPin = 13; // LED test pin
int rxPin = 0; // RX PIN
int txPin = 1; // TX TX
int byteGPS=-1;
char linea[300] = “”;
char comandoGPR[7] = “$GPRMC”;
int cont=0;
int bien=0;
int conta=0;
int indices[13];
/------------------------------------/

void setup() {
// initialize serial communication:
Serial.begin(9600);
/* parallax code */
for (int i=0;i<300;i++){ // Initialize a buffer for received data
linea[i]=’ ';
}

// initialize the LED pins:
pinMode(ledPin, OUTPUT);
}

void loop() {

digitalWrite(ledPin, HIGH);
byteGPS=Serial.read(); // Read a byte of the serial port
if (byteGPS == -1) { // See if the port is empty yet
delay(100);
} else {
linea[conta]=byteGPS; // If there is serial port data, it is put in the buffer
conta++;
Serial.print(byteGPS, BYTE);

 }

}

/*

// read the port:

int availableBytes = Serial.available();
for(int i=0; i<availableBytes; i++)
{
string[i] = Serial.read();
}
Serial.print(string);
Serial.println();
} */[/code]