GPS Bee with Seeeduino Stalker v3

Hi guys:

I have been scouring the web and the forums, but I cannot find a working example.

  1. Is it possible to get the GPS data back across to the Arduino Serial Monitor via the UartsBeev4 ?
  2. Does GPS Bee use Pins 2 and 3 for Rx and Tx, respectively?
  3. Can someone please post a working sketch for a Seeeduino Stalker v3 with a GPS Bee ?

Thank you very much.

Hello,

Please see the following forum post here. It has solution for your requirements.

By default, hardware UART is connected to Xbee. It is also used to upload/debug code. Stalker has provisions to use software serial library by modifying PCB jumpers.

Thanks and Warm Regards.

Sorry, I just want to access the GPS Bee. Is there another way, instead of soldering?

Do you know the PINS that the GPS Bee uses for a sketch? Thanks.

Hello:

I have a Seeeduino Stalker v3 with a GPS Bee and am connecting to the Stalker via the UartsBeeV4

I cannot seem to get a simple GPS sketch (TinyGPS++ example) working to access the GPS Bee. I am using a sketch that I had working previously with the Grove GPS twig. I am assuming that the GPS Bee is on Pins Rx 2 and Tx 3 as well.

However, when I run this sketch I don’t get GPS data and then I get an error to ‘check wiring’. Any ideas appreciated. Thank you.

Hello,

  1. GPS Bee UART are located at pin 2 and pin 3 of Xbee socket. Please refer seeedstudio.com/wiki/GPS_Bee … and_Rating.
  2. These pins are connected to Hardware UART(D0, D1) of Atmega328 when used with Stalker V3. The same Hardware UART is used by UARTSBee to program / debug the chip. Hence, once a sketch is uploaded that uses hardware UART, it is not available for UARTSBee for debugging.
    3.If you require debug function using Serial monitor and would like to use Bee modules, please use Software Serial port by soldering jumpers. In this case, the software serial port is connected to GPS Bee and Hardware Serial port is connected to UARTSBee.

There is an example to use S/W and H/W Serial with GPS Grove (uses the same GPS module. Port this code to GPS Bee): seeedstudio.com/wiki/Grove_-_GPS

Thanks and Warm Regards.

OK, great. So, I can assume the the GPS Bee will be picked up on Pins 2 and 3 once I disconnect the UartsBeev4, correct?

I was using the grove sketch to prototype previously on a UNO with a Grove Shield and the Grove GPS, and am now wanting to migrate to the Seeeduino Stalker v3 for deployment in the field. Thanks.

So I will grab an SD card and write to that to make sure the GPS Bee is picking up when the UartsBeev4 is disconnected.

Kind of like putting a light sensor in the fridge when shutting the door to make sure the light goes off :wink:

Thanks.

Hello,

Yes. Upload firmware first and then connect GPSBee.

If you are making a Open Source project, you could write about it as a Recipe here.

Happy Making :slight_smile:

Sorry, in my sketch I am using pins 2 and 3, just like with the Grove GPS example (which works nicely with the Grove GPS). Given the comment above, should my Sketch be referencing pins 0 and 1 for the GPS Bee? I am still not getting any data back from the GPS Bee … or should I just order more Grove GPS units and bin the GPS Bees (obviously I want them to work)? Thanks.

Yes. The above schematic shows this connection.

BEE_TXD -->Atmega328 PD0/RXD (i.e Arduino Digital Pin 0)
BEE_RXD -->Atmega328 PD1/TXD (i.e Arduino Digital Pin 1)

Thanks and Warm Regards.

Thanks again. So, would you be able to write a sample sketch, or to verify this one:

#include <SPI.h>
#include <SD.h>
#include <SoftwareSerial.h>
#include <TinyGPS++.h>
TinyGPSPlus gps;
//static const int RXPin = 3, TXPin = 2;
static const uint32_t GPSBaud = 9600;
const int chipSelect = 10;
SoftwareSerial ss(0, 1);

void setup()
{
// Open serial communications and wait for port to open:
Serial.begin(9600);
ss.begin(GPSBaud);

}

void loop()
{
// make a string for assembling the data to log:
String dataString = “”;
float latf = gps.location.lat();
float longf = gps.location.lng();
String latString = String(latf);
String longString = String(longf);

dataString += latString;
dataString +=",";
dataString += longString;

// open the file. note that only one file can be open at a time,
// so you have to close this one before opening another.
File dataFile = SD.open(“datalog.txt”, FILE_WRITE);

// if the file is available, write to it:
if (dataFile) {
dataFile.println(dataString);
dataFile.close();

}

}

Please try this example. We used the Serial() interface i.e H/W UART to access GPSBee:

//Code based on examples of TinyGPS++ library.
#include <SPI.h>
#include <SD.h>
#include <TinyGPS++.h>
TinyGPSPlus gps;

static const uint32_t GPSBaud = 9600;
const int chipSelect = 10;


void setup()
{
  // Open serial communications and wait for port to open:
  Serial.begin(GPSBaud);


  // Check if SD card can be intialized.
  if (!SD.begin(10))  //Chipselect is on pin 10
  {
  return;
  }


}

void loop()
{

  // This sketch displays information every time a new sentence is correctly encoded.
  while (Serial.available() > 0)
  if (gps.encode(Serial.read()))
  displayInfo();



}

void displayInfo() 
{
  // open the file. note that only one file can be open at a time,
  // so you have to close this one before opening another.
  File dataFile = SD.open("datalog.txt", FILE_WRITE);

  // if the file is available, write to it:
  if (gps.location.isValid())
  {
  if (dataFile) 
    {
      dataFile.println(gps.location.lat(), 6);
      dataFile.println(gps.location.lng(), 6);
      dataFile.close();
    }
  }
  else 
  {
   
    dataFile.println("Invalid");;
    dataFile.close();
  }

}