Hi,
I'm trying to use a GPS Bee with a Seeeduino Stalker2.0, but I'm not able to obtain nmea string, either in the bee slot and using a seeedstudio xbeeShield. No problem when I link an xbee module in these 2 places.
No problem when I use a GPS Bee with a regular Arduino and a XbeeShield.
Here the code I use:
/*
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;
#include <Wire.h>
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();
} */
Thank you for any opinion!
Marco.