There is a good tutorial on the Arduino Playground for the GPS I am using: Arduino Playground - GPS
My question though is I want to use the device in Smartmode. This mode allows me to send and receive data from certain registers. To do this I left the /RAW pin disconnected(the data sheet says so, http://grandideastudio.com/wp-content/uploads/gps_manual_2.0.pdf).
Right now I am trying to write code that allows me to just check one register the GetValid register (0x01). But the only thing I am getting when I run the code below is "!GPS 85" over and over again.
int const rxPin = 0;
int const txPin = 1;
int const validityAddress = 0x01; //tell us if our data is valid, returns 1byte
int const satellites = 0x02; //# of active satellite connections, returns 1byte
int const latitude = 0x05; //degrees,minutes,fractional minutes, returns 5bytes
int const longitude = 0x06; //degrees,minutes,fractional minutes, returns 5bytes
int const boardSpeed = 0x08; //knots, returns 2bytes
int validity;
void setup() {
pinMode(rxPin, INPUT);
pinMode(txPin, OUTPUT);
Serial.begin(4800);
}
void loop(){
digitalWrite(txPin, HIGH);
Serial.write("!GPS");
Serial.write(validityAddress);
digitalWrite(txPin, LOW);
digitalWrite(rxPin, HIGH);
validity = Serial.read();
digitalWrite(rxPin, LOW);
Serial.print(validity);
delay(500);
}