Interfacing GSM Module With Arduino Uno and Displaying Message on LCD Display

Intro: Interfacing GSM Module With Arduino Uno and Displaying Message on LCD Display

In this project, we will employ GSM module SIM900 display messages sent to the module on LCD using Arduino UNO.
About GSM Module(SIM900):

SimCom SIM900 GSM / GPRS Modem can accept any GSM network operator SIM card and act like a mobile with its own unique phone number. The advantage of using this modem will be that you can use its RS232 port to communicate. Applications like SMS Control, remote control, data transfer, and logging can be developed easily.

The modem can either be connected to PC serial port directly or to any microcontroller through MAX232. It can be used to send and receive SMS or make/receive voice calls. It can also be used in GPRS modem to connect to the internet and utilize to make many applications for data logging and control. For example, In GPRS mode you can also connect to any remote FTP server and upload files for data logging. GSM modem is a highly flexible plug and plays quad-band SIM900A GSM modem for direct and easy integration to RS232 applications. Supports features like SMS, Voice, Data/Fax, GPRS and integrated TCP/IP stack.

Step 1: Components Required:

- Arduino board 1

- GSM Module (SIM900A) 1

- Few jumper wires

- LCD 16*2 display 1

- Bread board 1

- POT (100k) 1

You can buy these components from elegocart, probably the only company which sells TESTED components.

Step 2: Project Setup:

Step 3: Code:

#include <liquidcrystal.h>
#include <softwareserial.h>

LiquidCrystal lcd(12,11,5,4,3,2); SoftwareSerial SIM900(7,8 ); int inByte=0; void setup() { Serial.begin(9600); SIM900.begin(9600); lcd.begin(16, 2); lcd.print("Hi"); lcd.setCursor(0, 1); lcd.print("READ THE MESSAGE"); delay(2000); lcd.clear(); SIM900.print("AT+CMGF=1\r"); delay(100); SIM900.print("AT+CNMI=2,2,0,0,0\r");

do { while ( !SIM900.available() ); } while ( '"' != SIM900.read() ); do { while ( !SIM900.available() ); } while ( '"' != SIM900.read() ); do { while ( !SIM900.available() ); } while ( '"' != SIM900.read() ); do { while ( !SIM900.available() ); } while ( '"' != SIM900.read() ); do { while ( !SIM900.available() ); } while ( '"' != SIM900.read() ); do { while ( !SIM900.available() ); } while ( '"' != SIM900.read() ); while ( !SIM900.available() ); inByte = SIM900.read(); while ( !SIM900.available() ); inByte = SIM900.read();

lcd.clear(); while(1) { while ( !SIM900.available() ); inByte = SIM900.read(); if ( inByte == '\r' ) break; else; Serial.write(inByte); lcd.write ( inByte ); }

} void loop() { delay(150); }

Share

    Recommendations

    • Optics Contest

      Optics Contest
    • Make it Glow Contest 2018

      Make it Glow Contest 2018
    • Plastics Contest

      Plastics Contest

    Discussions