Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 8 of 8

Thread: Teensy GPS

  1. #1
    Junior Member
    Join Date
    Aug 2019
    Posts
    3

    Teensy GPS

    Hi, I am having trouble on working with adafruit ultimate gps with teensy 3.2. when i test the code in my Arduino Uno it seems fine and I get the result i want but when i upload it with teensy it does not work. i use other sensors that works with UNO like max30100 then try it to teensy it works fine . I check the connection it's on right pins i even interchange the pins but i get the same result. it seems like only the gps module doesn't work. what should i do??

    Click image for larger version. 

Name:	Capture.jpg 
Views:	13 
Size:	113.7 KB 
ID:	17150
    I am using the full example of TinyGPS++

  2. #2
    Member
    Join Date
    Sep 2015
    Location
    Mechelen, Belgium
    Posts
    21
    Hi Gill,

    hmm, you are using software serial?

    why not use the hardware serial ports on the T3.2 I did and it works very well.

    like this:

    Code:
    TinyGPSPlus gps;
    #define ss Serial1
    regards, Otto

  3. #3
    Senior Member+
    Join Date
    Jul 2014
    Location
    New York
    Posts
    3,682
    Usually when I see that message I have my RX/Tx lines crossed going from the GPS to the Teensy. Remember GPS Tx goes to Teensy Rx, and GPS Rx goes to Tx.

  4. #4
    Senior Member+
    Join Date
    Jul 2014
    Location
    New York
    Posts
    3,682
    Quote Originally Posted by mjs513 View Post
    Usually when I see that message I have my RX/Tx lines crossed going from the GPS to the Teensy. Remember GPS Tx goes to Teensy Rx, and GPS Rx goes to Tx.
    PS = also do what Otto recommended = I stay away from Altsoftser on the teensy. They have enough Serial ports that you really don't need it.

  5. #5
    Senior Member
    Join Date
    Nov 2012
    Posts
    1,136
    The default baud rate for the Adafruit Ultimate GPS is 9600 baud. The TinyGPS++ code works for me with the Adafruit GPS (at 9600) even with the software serial.

    Pete

  6. #6
    Junior Member
    Join Date
    Aug 2019
    Posts
    3
    i tried using the hardware serial ports like Otto said but the result is still the same with TinyGPS++ Lib. but i also try different lib . turns out in my case, the Adafriut GPS lib works with hardware serial ports. The reason why i use the Tiny gps lib in the first place is that Adafriut gps lib give me this error (see pic attached)
    Click image for larger version. 

Name:	Capture.jpg 
Views:	6 
Size:	71.4 KB 
ID:	17155
    but it was fixed using the hardwareserial port.. THANK YOU very much!

  7. #7
    Senior Member
    Join Date
    Nov 2012
    Posts
    1,136
    Just copy and paste the text into your message (between code tags). So much easier to read.

    Pete

  8. #8
    Senior Member+
    Join Date
    Jul 2014
    Location
    New York
    Posts
    3,682
    Quote Originally Posted by el_supremo View Post
    Just copy and paste the text into your message (between code tags). So much easier to read.

    Pete
    Just took a quick look at the library. In the Adafruit_GPS.h file I noticed this for software serial:
    Code:
    // Fllybob added lines 34,35 and 40,41 to add 100mHz logging capability
    
    #ifndef _ADAFRUIT_GPS_H
    #define _ADAFRUIT_GPS_H
    
    #define USE_SW_SERIAL ///< comment this out if you don't want to include software serial in the library
    So first step would be to comment out that line in the .h file. Next step is add the HW serial port to your sketch as @Gill suggested. From the examples:
    Code:
    // what's the name of the hardware serial port?
    #define GPSSerial Serial1
    
    // Connect to the GPS on the hardware port
    Adafruit_GPS GPS(&GPSSerial);
    If you are using Serial1

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •