Reply To: HOW TO SEND AN SMS USING GSM MODEM CONNECTED TO ARDUINO

Home Forums ARDUINO PROJECTS HOW TO SEND AN SMS USING GSM MODEM CONNECTED TO ARDUINO Reply To: HOW TO SEND AN SMS USING GSM MODEM CONNECTED TO ARDUINO

#2799

siladityaa
Member

Hi,

your code helped me a lot but can you please tell me a way of sending the values in a variable as an sms. Please revert back ASAP.

`void sendsms()
{
Serial.begin(2400); //Baud rate of the GSM/GPRS Module
Serial.print(“\r”);
delay(1000);
Serial.print(“AT+CMGF=1\r”);
delay(1000);
Serial.print(“AT+CMGS=\”+91XXXXXXXXXX\”\r”); //Number to which you want to send the sms
delay(1000);
Serial.print(“The reading at which the irrigation stopped is”+sensor_value); //The text of the message to be sent
delay(1000);
Serial.write(0x1A);
delay(1000);
}’
Thanks in advance