hwhardsoft
Published © GPL3+

How to Use NMEA-0183 with Arduino

How to connect GPS, SONAR, sensors, auto pilot units etc. in ships and boats via NMEA 0183 to Arduino.

BeginnerFull instructions provided31,996
How to Use NMEA-0183 with Arduino

Things used in this project

Story

Read more

Code

NMEA 0183 demo

Arduino
Parsing NMEA 0183 protocols
#include <NMEA0183.h>

// matches Zihatec RS422/RS485 shield
SoftwareSerial gps(2, 3);
NMEA0183 nmea;

void setup()
{
  while (!Serial);
  Serial.begin(115200);
  gps.begin(4800);
  Serial.println("NMEA0183 parser test");
}

void loop()
{
  if (gps.available())
  {
    char c = gps.read();
    if (nmea.update(c))
    {
      Serial.print("NMEA0183 sentence accepted (");
      Serial.print(nmea.getFields());
      Serial.print(" fields): ");
      Serial.write(nmea.getSentence());
      Serial.println();
    }
  }
}

Credits

hwhardsoft

hwhardsoft

17 projects • 75 followers

Comments