How to let the GSM module send a message to the customer whenever the customer sends a message to the SIM card number in the SIM800L with only the message content being “airtime”.
Have you got a program that can receive SMS messages and display them on the Serial Monitor? If not that should be the first step.
If you have a program that you need help with then post the program.
//Include Library because we are using digital pins for connection
/Initializing digital pins for connection to serve as Rx and Tx
Rx pin is 7 and Tx pin is 8/
SoftwareSerial SIM800(7, 8 );
//Variable for storing incoming messsages content
char incoming_char = 0;
// Baudrate for serial monitor
//Baudrate for GSM shield
// Give time to log on to network.
// Now we simply display any text that the GSM shield sends out on the serial monitor
//Get the character from the cellular serial port.
//Print the incoming character to the terminal.
Yes I have a code that prints out
The code you have posted just prints each character as it is received. It is not collecting a complete message. If you want to search for a particular word then you need to capture the complete message
Have a look at the second example in Serial Input Basics.