--> Project V - 7. Send SMS From Arduino using SIM900A | basic arduino tutorial

Thursday, September 7, 2017

Project V - 7. Send SMS From Arduino using SIM900A

| Thursday, September 7, 2017
Send SMS From Arduino using SIM900A


rduino will be programmed to send a certain message to a predefined number using SMS. The GSM module used is SIM900A. Initial process and message delivery process will be displayed on LCD 20x4 with I2C connection.

Hardware Requirement
  • Arduino Uno Board
  • PC/Laptop with Arduino Ide installed
  • SIM900A GSM Module (you can also use Wavecom)
  • LCD 16*2 or 20*4 (with i2c connection is recomended)
  • Power supply +5 Volt
  • Jumper

SIM900A | Source

Block Diagram


Schematic

 Arduino - LCD 20x4


 Learn more about I2C connections --> Project V - 14


Arduino - SIM900A

Source Code

*/
#include <GPRS_Shield_Arduino.h>
#include <SoftwareSerial.h>
//#include <Wire.h>

#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x3F, 20, 4);


#define PIN_TX    9
#define PIN_RX    8
#define BAUDRATE  9600
#define PHONE_NUMBER "085640207374"
#define MESSAGE  "hello,world"

GPRS gprsTest(PIN_TX, PIN_RX, BAUDRATE); //RX,TX,BaudRate

void setup() {
  lcd.begin();
  delay(6000);
  lcd.setCursor(0, 0);
  lcd.print("Initialization.....");
  while (!gprsTest.init()) {
    delay(1000);
    lcd.setCursor(0, 1);
    lcd.print("   init error  ");
  }
  lcd.setCursor(0, 1);
  lcd.print("Gprs init success");
  lcd.setCursor(0, 2);
  lcd.print("Sending a message ...");
  gprsTest.sendSMS(PHONE_NUMBER, MESSAGE); //define phone number and text
  delay(3000);
  lcd.setCursor(0, 3);
  lcd.print("        DONE       ");
}

void loop() {
  //nothing to do
}


How it Works

1. Connect the Arduino with Peripherals needed.
2. Plug in the Power Source on the device.

3. Add some library if needed
4. Compile and upload the script program
5. First, Modem will initialize and it takes about 3 seconds



6. Arduino will give orders to send SMS to certain number


 7. Done



Video for Project V - 7. Send SMS From Arduino using SIM900A





Required file


Related Posts

No comments:

Post a Comment