Hola en este foro he encontrado un post del 2013 que no lo entiendo muy bien. He leído algo sobre punteros y creo que entiendo casi todo el código excepto el while, como recorremos el puntero sin un indice?, o mediante resultado = strtok( NULL, delimitadores ); vamos eliminando registros y lo que se muestra es siempre el primero:
http://forum.arduino.cc/index.php?topic=155209.0
#include <String.h>
char *strtok( char *str1, const char *str2 );
void setup()
{
Serial.begin(9600);
char str[] = "ESC 'D' CR ESC \"#XXXXXXXX\" CR ESC 'E' CR";
char delimitadores[] = " ";
char *resultado = NULL;
resultado = strtok( str, delimitadores );
while( resultado != NULL )
{
Serial.println(resultado);
resultado = strtok( NULL, delimitadores );
delay(5000);
}
}
void loop () {
}
Muchas gracias por anticipado.