This project is about how to send an SMS from GSM Module to Mobile using GSM SIM 800 C Module.
Components Required1. Arduino Uno
2. GSM SIM 800 C Module
3. SIM Card
4. 12 V Adapter
Here we are using GSM SIM 800 C Shield. Since it is shield, we can place this shield directly on the Arduino Uno Board like below.
Insert the SIM Card in the holder provided in the GSM Module and then lock the SIM Card holder like below.
Then give the power supply to the GSM Module.
In the program we need to give the phone number where we need to send the message. For this module, no need to give the country code in front of the phone number. In case if you are facing problem to send SMS from your board, you can add the country code.
Source Code
//Tech Trends Shameer
//Send SMS from GSM Module to Mobile
#include <SoftwareSerial.h>
#include "Adafruit_FONA.h"
#define FONA_RX 2
#define FONA_TX 3
#define FONA_RST 4
#define FONA_RI_INTERRUPT 0
char sendto[21] = "70xxxxxxxx"; // Enter your Mobile Number here. Exclude country code.
char message[141] = "Welcome to Tech Trends";
String techtrends;
SoftwareSerial fonaSS = SoftwareSerial(FONA_TX, FONA_RX);
Adafruit_FONA fona = Adafruit_FONA(FONA_RST);
void setup() {
Serial.begin(115200);
Serial.println(F("FONA incoming call example"));
Serial.println(F("Initializing....(May take 3 seconds)"));
delay(5000);
fonaSS.begin(4800); // if you're using software serial
if (! fona.begin(fonaSS)) { // can also try fona.begin(Serial1)
Serial.println(F("Couldn't find FONA"));
while (1);
}
Serial.println(F("FONA is OK"));
fona.print ("AT+CSMP=17,167,0,0\r");
fona.sendSMS(sendto, message);
delay(1000);
}
void loop()
{
delay(10000);
}
Video of the project
Comments