hi there
im using the stalker 2.1 with gps bee i have only been able to get it to work with jumpers from the
bees rx & tx pins to the stalkers digital pins 2 and 3
this code should get you going at least printing gps strings to the serial monitor
you may want to comment out the code that sets nav mode as it stands it sets to pedestrian mode
the line that is allready commented out will set to airbourne mode
the other parts preceeded by $pubx turn on or off specific sentences ie ("$PUBX,40,RMC,0,1,0,0*46");//on
hope this helps if im still unclear let me know
[code]#include <NewSoftSerial.h>
NewSoftSerial ss(2, 3);
void setup()
{
Serial.begin(9600);
ss.begin(9600);
delay(3000);
delay(3000);
ss.println("$PUBX,41,1,0003,96,0,0*14");//on
// Set the navigation mode (Airborne, 1G) top line
// Set the navigation mode (pedestrian) bottom line
Serial.print("Setting uBlox nav mode: ");
uint8_t setNav[] = //{0xB5, 0x62, 0x06, 0x24, 0x24, 0x00, 0xFF, 0xFF, 0x06, 0x03, 0x00, 0x00, 0x00, 0x00, 0x10, 0x27, 0x00, 0x00, 0x05, 0x00, 0xFA, 0x00, 0xFA, 0x00, 0x64, 0x00, 0x2C, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0xDC};// airbourne
{0xB5, 0x62, 0x06, 0x24, 0x24,0x00, 0xFF, 0xFF, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x10, 0x27, 0x00, 0x00, 0x05, 0x00, 0xFA, 0x00, 0xFA, 0x00, 0x64, 0x00, 0x2C, 0x01, 0x00, 0x00, 0x00, 0x00,0x00,0x00,0x00, 0x00, 0x00, 0x00,0x00,0x00,0x00,0x00, 0x13, 0x76}; //pedestrian
//sendUBX(setNav, sizeof(setNav)/sizeof(uint8_t)); //this polls the message
//getUBX_ACK(setNav); leave commented
ss.println("$PUBX,40,GLL,0,1,0,05D");//on
// ss.println("$PUBX,40,GLL,0,0,0,05C");//off
//----------------------------------------
ss.println("$PUBX,40,GGA,0,1,0,05B");//on
// ss.println("$PUBX,40,GGA,0,0,0,05A");//off
//------------------------------------------
ss.println("$PUBX,40,GSA,0,1,0,04F");//on
// ss.println("$PUBX,40,GSA,0,0,0,04E");//off
//------------------------------------------------
ss.println("$PUBX,40,RMC,0,1,0,046");//on
// ss.println("$PUBX,40,RMC,0,0,0,047");//off
//------------------------------------------------
ss.println("$PUBX,40,GSV,0,1,0,058");//on
// ss.println("$PUBX,40,GSV,0,0,0,059");//off
//---------------------------------------
ss.println("$PUBX,40,VTG,0,1,0,05F");//on
// ss.println("$PUBX,40,VTG,0,0,0,05E");//off
delay(3000);
}
void loop()
{ // For one second we parse GPS data and report some key values
for (unsigned long start = millis(); millis() - start < 1000;)
{
while (ss.available())
{
char c = ss.read();
Serial.write(c); // uncomment this line if you want to see the GPS data flowing
// if (gps.encode(c)) // Did a new valid sentence come in?
// newData = true;
}
}
}[/code]