I’m trying to read GPS NMEA strings on a software serial and write them out to the hardware serial so I can see them on the serial monitor, but I can’t seem to get any NMEA strings.
I have an Arduino Uno R3, Bees shield, and GPS Bee.
http://www.seeedstudio.com/depot/bees-shield-p-672.html?cPath=132_134
http://www.seeedstudio.com/depot/gps-bee-kit-with-mini-embedded-antenna-p-560.html?cPath=144_145
Here’s the code I’ve uploaded to my board (I’ve tried baud rate of both 9600 and 4800 for the software serial). Bee1_TX jumper is on pin 12 and Bee1_RX is on pin 11.
[code]#include “SoftwareSerial.h”
const unsigned int GPS_RX = 11;
const unsigned int GPS_TX = 12;
SoftwareSerial ss(GPS_RX, GPS_TX);
void setup() {
Serial.begin(9600); //baud rate for pc hw serial
pinMode(GPS_RX,INPUT);
pinMode(GPS_TX,OUTPUT);
ss.begin(9600); //baud rate may be wrong? 4800
delay(2000);
}
void loop() {
Serial.print("\nloop | “);
while(ss.available()) {
Serial.write(“ss is available |”);
int data = ss.read();
Serial.write(data);
Serial.write(”|");
}
delay(2000);
}[/code]
This is what I normally get back:
loop |
loop |
loop |
loop |
Sometimes I see that the software serial is available and Serial.write() returns a space while Serial.print() return a zero (though it seems to only happen if I’m holding everything together in my hands a certain way). I’m inside an apartment, so maybe it’s not connecting, but shouldn’t I regularly receive something from the GPS?
loop | ss is available | |
Questions:
- What is the baud rate for the GPS bee?
- Is there something I have to do to active the GPS bee so it will start sending data?
Similar issue with no resolution:
http://www.seeedstudio.com/forum/viewtopic.php?f=18&t=2701&p=14996&hilit=+gps+bee#p14996
Any suggestion as to what I’m doing wrong would be much appreciated. I’ve tried two different GPS bees and two different Bees shields with the same result. If I can provide any more information, please tell me. Thank you.