Libraries
\ NMEA
Reference for Wiring version 1.0 Build 0100+ If you have a previous version, use the reference included with your software. If see any errors or have any comments, let us know.
Name |
NMEA |
Examples |
#include <nmea.h>
NMEA gps(ALL);
void setup() {
Serial.begin(9600);
Serial1.begin(4800);
}
void loop() {
if (Serial1.available() > 0 ) {
if (gps.decode(Serial1.read())) {
Serial.print ("Sentence = ");
Serial.println (gps.sentence());
Serial.print ("Datatype = ");
Serial.println (gps.term(0));
Serial.print ("Number of terms = ");
Serial.println (gps.terms());
}
}
}
|
Description |
Data connection to a GPS receiver. When you plan to use only the GPRMC routines from this library, connect with NMEA(GPRMC), all sentences that are not of type GPRMC are then ignored. To use more advanced routines of this library, connect with NMEA(ALL). |
Syntax |
NMEA variable(connect)
|
Methods |
|
Parameters |
connect |
Can be ALL or GPRMC |
variable |
variable name referencing the object |
|
Returns |
None |
Usage |
Application |
Updated on July 07, 2011 11:11:08pm PDT