GSMSIM900L not sending message

Hi thanks in advance for the future response, I am trying to input a number using 4x3 keypad then store it to arduino and send sms yung gsm module however I cannot figure out why it is not working? Maybe anyone can give me advice? Thank you :slight_smile:

==========================================
CODE FOR SENDING SMS THAT I TRIED AND ITS WORKING WITHOUT KEYPAD BY DECLARING THE NUMBER

void sendmessage()
{
SMS.println(“AT+CMGF=1”); //AT command for text mode of gsm module
delay(1000);
SMS.println(“AT+CMGS=“09…”\r”);
delay(2000);
SMS.println(“sms send by arduino”);// the text you want to send
delay(100);
SMS.println((char)26);// ASCII code of CTRL+Z
delay(1000);
}

Below I edited it and its not working anymore hope you can help me ?
Thank you

Code For Sending SMS that is not working

I declared;
long num=0; <---- then when I press in keypad this long num has new value which is the numbers I entered

this is the code I am not quite sure what I did wrong >_<

==============================================

void sendmessage()
{
MYSMS.println(“AT+CMGF=1”); //AT command for text mode of gsm module
delay(1000);
MYSMS.println(“AT+CMGS=”");
MY SMS.print(num);r
MYSMS.print(""\r\n");
delay(2000);
MYSMS.println(“sms send by arduino”);// the text you want to send
delay(100);
MYSMS.println((char)26);// ASCII code of CTRL+Z
delay(1000);
}

I solved it :slight_smile: I solved it :slight_smile: I solved it :slight_smile: I solved it :slight_smile: I solved it :slight_smile: I solved it :slight_smile: I solved it :slight_smile: I solved it :slight_smile: I solved it :slight_smile: I solved it :slight_smile: I solved it :slight_smile: I solved it :slight_smile: I solved it :slight_smile: I solved it :slight_smile: I solved it :slight_smile: I solved it :slight_smile: I solved it :slight_smile: I solved it :slight_smile: I solved it :slight_smile: I solved it :slight_smile: I solved it :slight_smile: I solved it :slight_smile: I solved it :slight_smile: I solved it :slight_smile: I solved it :slight_smile: I solved it :slight_smile: I solved it :slight_smile: I solved it :slight_smile: I solved it :slight_smile: I solved it :slight_smile: I solved it :slight_smile: I solved it :slight_smile: I solved it :slight_smile: I solved it :slight_smile: I solved it :slight_smile: I solved it :slight_smile: I solved it :slight_smile: I solved it :slight_smile: I solved it :slight_smile: I solved it :slight_smile: I solved it :slight_smile: I solved it :slight_smile: I solved it :slight_smile: I solved it :slight_smile: I solved it :slight_smile: I solved it :slight_smile: I solved it :slight_smile: I solved it :slight_smile: I solved it :slight_smile: I solved it :slight_smile: I solved it :slight_smile: I solved it :slight_smile: I solved it :slight_smile: I solved it :slight_smile: I solved it :slight_smile: I solved it :slight_smile:

:smiley: . Glad that you fixed it. Share how you solved it. Others can also benefit from it

Yes, share what was wrong, and tell what you did to solve.

i have same problem please let me know the solution.