I wanted to know if there is any code to check if a sim800L successfully sends a text message. I will need this code so that every time my sim800L sends a text message successfully it would light up a LED light. I am also using a nodemcu-32S as my microcontroller and Arduino IDE.
here is my code for sending a text message
Serial.println(customKey);
Serial.println("SENDING CONFIRMATION TEXT");
sim800.print("AT+CMGF=1\r");
delay(1000);
sim800.print("AT+CMGS=\""+PHONE+"\"\r");
delay(1000);
sim800.print("Completed");
sim800.print(",");
sim800.print(orderID);
delay(100);
sim800.write(0x1A);
delay(1000);
Serial.println("SMS Sent Successfully.");
See AT command manual (found it online, I don't have the device myself) at chapter
4.2.5 AT+CMGS
- it looks like it should response, incl. whenever it succeeded.