TinyGPS wish to satellites

Hello everyone
I want to be able to read how many satellites are active right now.

Want to insert codes for satellites!
See mid-attempt below, which fails!
//****************************
//Satellite Count
lcd.setCursor(0, 3;
lcd.print("satellites : ");
lcd.println(lat_val, 6);
//*****************************
Do you have a good suggestion for me to enter in my codes to be able to see many satellites?

My code
Look at the bottom of my codes...

#include <SoftwareSerial.h>
#include <TinyGPS.h>
SoftwareSerial serial_connection(19, 18);  //RX=pin 19, TX=pin 18
#include <Wire.h>
#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x27, 20, 4);

//long   lat,lon; // create variable for latitude and longitude object
float lat, lon;
TinyGPS gps;  // create gps object

void setup() {
  lcd.init();  // initialize the lcd
  lcd.init();
  lcd.backlight();
  Serial.begin(57600);  // connect serial
  Serial.println("The GPS Received Signal:");
  Serial1.begin(9600);  // connect gps sensor
}

void loop() {
  while (Serial1.available()) {      // check for gps data
    if (gps.encode(Serial1.read()))  // encode gps data
    {
      gps.f_get_position(&lat, &lon);  // get latitude and longitude

      Serial.print("Position: ");

      //Latitude
      Serial.print("Latitude: ");
      Serial.print(lat, 6);
      Serial.print(",");
      //Longitude
      Serial.print("Longitude: ");
      Serial.println(lon, 6);

      //Longitude
      lcd.setCursor(0, 0);
      lcd.print("Latitude : ");
      lcd.print(lat, 5);

      lcd.setCursor(0, 1);
      lcd.print("Longitude: ");
      lcd.println(lon, 5);
      //****************************
      //**Satellite Count**
**       lcd.setCursor(0, 3;   **
**       lcd.print("satellites : ");**
**       lcd.println(lat_val, 6);**
      //*****************************
  }
}

In what specific way, does it fail? Did you forget a right parenthesis?

lcd.setCursor(0, 3;   **

Try the more up to date TinyGPS++;

http://arduiniana.org/libraries/tinygpsplus/

Serial.println(gps.satellites.value()); // Number of satellites in use (u32)

I think for the older TinyGPS library its;

Serial.println(gps.satellites());

why init lcd twice...??

Hello everyone

Does anyone here have a code with TinyGPS++; So I can test my GPS device.

Preferably a single code version.

Whats a 'single code' version ?

The easy way to test a GPS is a simple echo program such as;

void loop()
{
  while (Serial1.available())
  {
    Serial.write(Serial1.read());
  }
}


void setup()
{
  Serial1.begin(9600);
  Serial.begin(115200);
  Serial.println();
  Serial.println("GPS_Echo_Hardware_Serial Starting");
}

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.