Problem with Serial Monitor function

Status
Not open for further replies.

Rhundus

New member
Hi everyone,

I am using a teensy 3.1 to run a Flora GPS chip and put out GPS data to my computer. Just to test the functions and the device, I am using the gps example code from here: https://www.pjrc.com/teensy/td_libs_TinyGPS.html

The code compiles and uploads correctly, however when I open the Serial Monitor, absolutely nothing happens. What can I do to get the serial monitor up and running? Thanks for your help!
 
Serial() tested with some non-GPS program?

How is the GPS wired up? Powered? 3.3V compatible?

You should/should change the Teensy 3.1 program to use Serial1, Serial2, Serial3, the hardware UARTS.'
 
The GPS is functional and powered. I was able to get it to output raw data from another program. I'll try changing the program to use Serial1 and etc.
 
If you're running the example from that page, with "HardwareSerial Uart = HardwareSerial();", then you must connect the GPS output to pin 0 (RX1).

If you're running the examples that come with the library, like "simple_test", they use SoftwareSerial. On Teensy 3.1, SoftwareSerial can only receive if you use the hardware serial pins. For example, this will not work:

Code:
TinyGPS gps;
SoftwareSerial ss(3, 4);   // [B]does NOT work[/B], must be 0, 1

void setup()
{
  Serial.begin(115200);
  ss.begin(4800);

You must change those pins to 0 and 1, or just delete the SoftwareSerial stuff and use Serial1 in place of "ss".
 
Thank you for your help. The GPS output (TX) is connected to pin 0.

The code compiles, uploads, and prints the introductory text but does not print any GPS data to the serial monitor even when the chip has a fix. Do you have any idea why this could be happening? Thanks again!
 
I figured it out! By changing the Baud for the Uart to 9600 instead of 4800, the device was able to communicate correctly and print data. The location tracking works perfectly now! Thanks for your help!
 
Glad you found that! Almost all GPS modules default to 4800 baud, so I wouldn't have guessed it was the baud rate.
 
Right... the NMEA (National Maritime Electronics Assoc.) standard "NMEA 0183" defines the data formats from the GPS receiver and it says that the default shall be 4800 baud. The standard does NOT define data formats TO the GPS receiver- that's all vendor specific and sometimes held as company proprietary. So if your GPS was unused, it should have been set to 4800 baud!
 
Status
Not open for further replies.
Back
Top