Saludos tengo un ejemplo de datos que deseo separar, se muy poco estoy tratando se separar datos de un string pero no logro darle la sintaxis apropiada alguien puede guiarme a solucionar este ejemplo, saludos.
#include <String.h>
String datos= "1023,12,1,3,53,78,54";
void setup()
{
Serial.begin(9600);
char str[] = datos;
char *pch;
int i=0;
pch = strtok (str,",");
String buff[sizeof(str)];
while (pch != NULL)
{
buff[i]=(pch);
pch = strtok (NULL, ",");i++;
}
for(int x=0;x<i;x++){
Serial.println( buff[x]);
}
i=0;
}
void loop () {
}