Arduino (Tinygps) - why gps.Ncode always returns false?

Asked

Viewed 79 times

1

I’m doing some tests with Arduino UNO and the NEO6MV2 gps module. It’s a very populous component, but I have two modules with the same problem:

By running the code the Tinygps lib cannot translate anything that comes from the input:

#include <TinyGPS++.h>
#include <SoftwareSerial.h>

SoftwareSerial pins(10, 11);
TinyGPSPlus gps;

void setup() {
  Serial.begin(9600);
  pins.begin(9600);
}

void loop() {

  if(pins.available()) {
    Serial.println("pins ok!");
    if(gps.encode(pins.read())) { // false ever
      Serial.println(gps.altitude.meters());       
    }
  } else {
    Serial.println("pins not ready...");
  }
  delay(1000);
}

monitor

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.