3 Replies Latest reply on Dec 5, 2014 7:17 AM by Tuan_Bui

    Parsing output from system() command

    Tuan_Bui

      Does anyone know how to pipe output from the system() command into Arduino sketch so it can be parsed.

      Currently, system("ls > /dev/ttyGS0") simply dump output of the ls command into the serial port without giving the sketch a chance to intercept the result stream and do any parsing.

      Would be nice to do something like this

      system("some command | some pipe setup so Arduino sketch can wait on");

      while ( c =pipe.available()) {

           // do some string analysis

      }