I read a great post on splitting a string into multiple strings based on a ptr and delimiter but had problems implementing in my project...
code excerpt....
void setup() {
char str[] = "strtok needs to be called several times to split a string";
char delim[] = " ";
char *ptr = strtok(str, delim);
Serial.begin(115200);
while(ptr != NULL)
{
Serial.println(ptr);
ptr = strtok(NULL, delim);
}
}
void loop() {
}
OK, I have a project with two TTGO LoRa32 SX1276 OLED passing weather data from one to another...
I tried implementing the example but it looks as if that example starts with a predefined string within quotes...
if the line 'char str[]=LoRaData;' was encased in quotes I think it would work as the example did but that is where I am stuck.
The error I'm getting is that it cannot convert 'String' to 'char' in assignment.