Arduino_MKRGPS - satellites()

Read the number of satellites being tracked by the GPS.

Syntax

GPS.satellites()

Parameters

None.

Returns

The number of satellites being tracked by the GPS.

Example

// Check if there is new GPS data available
if (GPS.available()) {
    // Read GPS values
    int satellites = GPS.satellites();

    // ...

    // Print GPS data
    Serial.print("Number of satellites: ");
    Serial.println(satellites);
}

See also