shameermohamed
Published

How to Send SMS from GSM Module to Mobile

This project is about how to send an SMS from GSM Module to Mobile using GSM SIM 800 C Module.

IntermediateFull instructions provided30 minutes15,417
How to Send SMS from GSM Module to Mobile

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
GSM SIM 800 C Module
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

img_20211002_093913_hro8SMOpBr.jpg

Code

How to send SMS from GSM Module to Mobile

C/C++
//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()
{
  //fona.sendSMS(sendto, message);
  delay(10000);
}

Credits

shameermohamed

shameermohamed

2 projects • 6 followers
I m Shameer an oddball aquarius with love for all things simple &beautiful. I just keep it simple on this vlog with info about technology.

Comments