I currently gather a string via bluetooth to my arduino and the string only has 5 different letters. "HELLO". I now wish to store these individual letters in a string on their own. Right now i have this code:
First I create a single string:
Then I read my BTLEserial which is where I get the value that is being sent to the arduino and i store it in my string:
char c = BTLEserial.read(); readString += c;
readString now has the value "HELLO". Now i want to split it and what I have tried is to do it like this:
String stringOne = readString.substring (0,1); //H String stringTwo = readString.substring (1,2); //E String stringThree = readString.substring (2,3); //L String stringFour = readString.substring (3,4); //L String stringFive = readString.substring (4,5); //O
But with this i do not get the correct values in each string.
Appreciate every help I can get! :)