Description

end() – deregisters the CAN-bus receiver and data pool instance, closes the serial interface to the GPS receiver and stops the reception and distribution of the GPS data.

Syntax

GPS.end();

Parameters

none

Returns

nothing.

Example Code

The following example runs on any dice device. It either receives the GPS data with its embedded receiver or gets it from a capable node on the CAN bus (via data pool)

#include "DICE_GPS.h"
void setup()
{
  GPS.begin();
  while(!Serial);
  Serial.println("Waiting for GPS reception");
}
void loop()
{
  while(!GPS.isPositionValid() || !GPS.available()) { yield(); };
  Serial.println("GPS data:");
  Serial.println("- latitude: "+String(GPS.latitude()));
  Serial.println("- longitude:"+String(GPS.longitude()));
  GPS.end();
  while(1) { yield(); };
}

Notes and Warnings

This library auto includes the libraries ‘Datapool.h’ and ‘RTCSAMC.h’ making the global object ‘rtc’ available, too.

Examples can be found in the Arduino IDE menu:
File -> Examples -> DICE_GPS ->

See also

Find more details here:

Datapools
RTCSAMC