LightningRod
Member
I just got my Teensy3 and have it connected to my GPS, but I don't get any communication from on the GPS serial port. I've tried a bunch of stuff, but obviously, I'm missing something.
Here's my setup:
Teensy3 GPS-10920
GND <--> GND
RX2 <--> TX
TX2 <--> RX
3.3V <--> 3.3V
3.3V <--> VBAT
All other pins are open.
The green "NAV" light is flashing at about 1 pulse per second which I take to mean that it is getting a sat lock. (Although I'm not certain about that either).
Here is a minimal sketch: -- gpsSerial.available() is always false.
Here's my setup:
Teensy3 GPS-10920
GND <--> GND
RX2 <--> TX
TX2 <--> RX
3.3V <--> 3.3V
3.3V <--> VBAT
All other pins are open.
The green "NAV" light is flashing at about 1 pulse per second which I take to mean that it is getting a sat lock. (Although I'm not certain about that either).
Here is a minimal sketch: -- gpsSerial.available() is always false.
Code:
HardwareSerial gpsSerial = HardwareSerial2();
void setup()
{
delay(5000); // give me time to open the serial monitor.
Serial.begin(9600);
gpsSerial.begin(9600);
Serial.println( "setup complete" );
}
void loop()
{
bool gpsDataAvailable = false;
unsigned long start = millis();
while (millis() - start < 5000)
{
while( gpsSerial.available() )
{
gpsSerial.read();
gpsDataAvailable = true;
}
}
if ( gpsDataAvailable )
{
Serial.println( "gps connected" );
}
else
{
Serial.println( "gps not connected" );
}
}
Last edited: