Hi I have a string with a value of "1" I am trying to convert it but I get the value 8655. After doing some digging I found what I believe the correct way to convert but something is still wrong???
String stat[] = {type.substring(type.indexOf('=')+1,type.indexOf('=')+2)};
int TurnOn = int(stat);
It's not at all clear what you are trying to do exactly, but the method to convert a String with a series of digits in it into an integer is toInt(). See the examples and docs here:
You will find mixed opinions about the usefulness of String as opposed to char [] C-style strings. I am not a fan of String myself and would avoid it -- but that's just me.