HOW TO SEND AN SMS USING GSM MODEM CONNECTED TO ARDUINO

Home Forums PROJECT HOW TO SEND AN SMS USING GSM MODEM CONNECTED TO ARDUINO

This topic contains 0 replies, has 1 voice, and was last updated by  Chetan 9 months, 3 weeks ago.

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #1333

    Chetan
    Moderator

    Components Required:

    1. Arduino Board
    2. GSM/GPRS Modem (In this I have used SIM900 Module)
    3. PC/Laptop
    4. Connecting wires and USB cable for connecting Arduino to PC.

    1. FOR CODE WITHOUT USING LIBRARY FILES:
    `void setup()
    {
    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=\”+9185300xxxx9\”\r”); //Number to which you want to send the sms
    delay(1000);
    Serial.print(“iFuture Technology\r”); //The text of the message to be sent
    delay(1000);
    Serial.write(0x1A);
    delay(1000);
    }
    void loop()
    {
    }`

    2. FOR CODE WITH USING LIBRARY FILES:

    `#include “SIM900.h”

    #include <SoftwareSerial.h>

    #include “sms.h”

    SMSGSM sms;

    void setup()
    {
    Serial.begin(9600);
    Serial.println(“GSM Testing to send SMS”);
    if (gsm.begin(2400)){
    Serial.println(“\nstatus=READY”);
    started=true;
    }
    else Serial.println(“\nstatus=IDLE”);

    if(started){
    if (sms.SendSMS(“+9185300xxxx9″, “Arduino SMS”))// number to which you want to send the sms and the sms text//
    Serial.println(“\nSMS sent OK”);
    }
    };
    void loop()
    {
    };`

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.