c++ - How do I convert my GPS NEMA sentences to a string using an Arduino? -


i attempting parse information gps module using arduino uno. thought convert nema sentences strings, use simple code split comma separated text groups. once accomplished can display portions of groups screen.

is possible? have included simple code below. please keep in mind beginner when comes code.

int rxpin = 0;                    // rx pin  int txpin = 1;                    // tx tx string text = serial.read(); string message = text; int commapostion;  void setup() {    pinmode(rxpin, input);    pinmode(txpin, output);    serial.begin(4800);    serial.println(message);    do{      commaposition = message.indexof(',');      if(commaposition != -1)      {        serial.println(message.substring(0,commaposition));        message = message.substring(commaposition+1, message.length());      }      else      { //here after last comma found          if(message.length() > 0)              serial.println(message);      }      while(commaposition >=0);      { }  void loop() { } 

in programming, laziness virtue. why reinvent wheel, right?

check out tinygps library designed you're trying accomplish.


Comments

Popular posts from this blog

How to mention the localhost in android -

php - Calling a template part from a post -

c# - String.format() DateTime With Arabic culture -