I have been working on this a while and I cannot seem to figure it out. Essentially, I am using the app/server Blynk and their Terminal Widget to sent String inputs to my Arduino board. My code is below:
String fromTerminal = param.asStr();
int indexstart = fromTerminal.indexOf(",");
int indexend = fromTerminal.lastIndexOf(",");
int counter = indexstart - indexend;
INFO[counter] = fromTerminal;
My thoughts on the code was, based on the number of "," I enter in the string then that will assign my input to an index within the INFO array. However as I have tried several different things, I constantly get errors such as: cannot convert 'String' to 'char' in assignment. Oddly enough if I set: INFO[counter] = fromTerminal.toInt(); I dont get an error but I dont think that will allow me to print out my actual input. Any help is much appreciated, thanks!