I am separating the numbers that are only 8 digits and they will always be that way, the code does not work nor does it tell me any error
void setup() {
}
void loop() {
mensaje_sms();
}
void mensaje_sms()
{
if (Serial.available() > 0) {
String Texto = String(Serial.read()); // introduced in the Monitor Series:
// 77889966Hello World: The numbers will always be 8 digits
String numero = Texto.substring(0, 7); // I'm separating the number
String mensaje = Texto.substring(8); // this message
SIM900.print("AT+CMGF=1\r");
delay(100);
SIM900.print("AT+CMGS="591");
SIM900.print(numero);
SIM900.println(""");
delay(100);
SIM900.println(mensaje);
delay(100);
SIM900.println((char)26);
delay(100);
SIM900.println();
delay(5000);
Serial.println("SMS sent successfully");
}
}