logger/fix time/NMEA

I’ve never played with GPS before, bought the logger quite a while ago, just now starting to tinker with it.

I’m using AF’s 128x64 OLED display, a Teensy 3.0, The venus logger SMA, SMA antenna (non-housed), and a 3V3 FTDI cable.

Sitting at my desk, my phone can fix on 6 birds.

I loaded the TinyGPS lib, got the display to work, and got things to “seemingly” behave.

But the GPS won’t fix? It just keeps saying 0 satellites. I plug my FTDI into the loop to see the NMEA strings (which i had to look up to debug), and they all say V/Void in the validity term.

Am I missing anything, or does it just not want to fix? I set it in a south facing window for 30 minutes, and the LED was still solid green, and display showed 0 birds.

#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#include <TinyGPS.h>

#define OLED_DC 21
#define OLED_CS 10
#define OLED_CLK 13
#define OLED_MOSI 11
#define OLED_RESET 9
Adafruit_SSD1306 display(OLED_MOSI, OLED_CLK, OLED_DC, OLED_RESET, OLED_CS);

#if (SSD1306_LCDHEIGHT != 64)
#error("Height incorrect, please fix Adafruit_SSD1306.h!");
#endif

TinyGPS gps;
elapsedMillis checkData;

void setup()   {                
  
  // by default, we'll generate the high voltage from the 3.3v line internally! (neat!)
  display.begin(SSD1306_SWITCHCAPVCC);
  Serial1.begin(9600);
  // init done
  
  display.display(); // show splashscreen
  delay(2000);
  display.clearDisplay();   // clears the screen and buffer
    
    // text display tests
  display.setTextSize(1);
  display.setTextColor(WHITE);
  display.setCursor(0,0);
  
  display.print("Simple TinyGPS library v. "); 
  display.println(TinyGPS::library_version());
  display.println("by Mikal Hart");
  
  display.display(); 
  delay(1000);
  display.clearDisplay();   // clears the screen and buffer  
  display.display(); 
  display.setCursor(0,0);
}

  int printCount = 0;

void loop() {
  
  bool newData = false;
  unsigned long chars;
  unsigned short sentences, failed;

  // For one second we parse GPS data and report some key values
  for (unsigned long start = millis(); millis() - start < 1000;)
  {
    //display.print("a");
    while (Serial1.available())
    {
      //display.print("b");
      char c = Serial1.read();
       display.print(c); // uncomment this line if you want to see the GPS data flowing
      if (gps.encode(c)){ // Did a new valid sentence come in?
      //display.print("c");
        newData = true;
        display.display();
      }
    }
  }
  
   if (checkData > 1000){
  checkData = checkData - 1000;   
  display.clearDisplay();   // clears the screen and buffer 
  display.setCursor(0,0); 
  display.display();
  
   }

    float flat, flon;
    unsigned long age;
    gps.f_get_position(&flat, &flon, &age);
    display.print("LAT=");
    display.println(flat == TinyGPS::GPS_INVALID_F_ANGLE ? 0.0 : flat, 6);
    display.print(" LON=");
    display.println(flon == TinyGPS::GPS_INVALID_F_ANGLE ? 0.0 : flon, 6);
    display.print(" SAT=");
    display.println(gps.satellites() == TinyGPS::GPS_INVALID_SATELLITES ? 0 : gps.satellites());
 display.display();
 

  
}

Try taking the GPS outside. Receiver sensitivities vary a lot.

I took it outside, and the LED started blinking, but TinyGPS still kept saying no birds and no location.

After soldering my connections (been using a sodlerless breadboard), it’s working now. It won’t get the initial fix indoors, but if I take it outside, let it pick up all 9 birds, then I can come back in and it will stay connected. Which I like very much in this oppressive texas heat.

question:

I’ll be powering from an external 3V3 source when operational. What would be the best way to wire in a up-keep battery to keep the chip awake, but not processing? Something about cold start vs hot start?