i have char arrey that get from serial and after thet split to 2 strings.
and i want to convert the 2 string to 2 int.
if (Serial.available() > 0){
for (i = 0 ; i < 5 ; i++)
readchar[i] = Serial. read();
}
String stra = String (readchar[0] + readchar[1] + readchar[2]);
String strb = String (readchar[3] + readchar[4] + readchar[5]);
speedA = (int)stra;
speedB = (int)strb;
error:
error: invalid cast from type 'String' to type 'int'