msr048
Published © GPL3+

Display Board

Display board using GSM module.

AdvancedFull instructions provided1,800
Display Board

Things used in this project

Hardware components

Arduino UNO & Genuino UNO
Arduino UNO & Genuino UNO
×1
Alphanumeric LCD, 16 x 2
Alphanumeric LCD, 16 x 2
×1
Arduino GSM shield V2
Arduino GSM shield V2
×1
Resistor 330 ohm
Resistor 330 ohm
×1
Jumper wires (generic)
Jumper wires (generic)
×1
Single Turn Potentiometer- 10k ohms
Single Turn Potentiometer- 10k ohms
×1
Solderless Breadboard Full Size
Solderless Breadboard Full Size
×1
60W PCIe 12V 5A Power Supply
Digilent 60W PCIe 12V 5A Power Supply
×1
Android device
Android device
×1
sim card 2G
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

Circuit Diagram

Code

Code

C/C++
//www.YouTube.com/Electronics is Fun//
//Mohd Sohail//


#include <LiquidCrystal.h>
LiquidCrystal lcd(3,4,5,6,7,8);

int led=13;

int temp=0,i=0,x=0,k=0;
char str[100],msg[32];

void setup() 
{
  lcd.begin(16,2);
  Serial.begin(9600);
  pinMode(led, OUTPUT);
  digitalWrite(led, HIGH);
  lcd.print("GSM Initilizing...");
  gsm_init();
  lcd.setCursor(0,0);
  lcd.print("GSM Display");
  lcd.setCursor(0,1);
  lcd.print("    Board      ");
  delay(2000);
  lcd.clear();
  lcd.print("Electronics is Fun");
  delay(1000);
  lcd.setCursor(0,1);
  lcd.print("System Ready");
  Serial.println("AT+CNMI=2,2,0,0,0");
  delay(500);
  Serial.println("AT+CMGF=1");
  delay(1000);
  digitalWrite(led, LOW);
}

void loop()    
{
  for(unsigned int t=0;t<60000;t++)
  {
    serialEvent();
  if(temp==1)
  {
    x=0,k=0,temp=0;
    while(x<i)
    {
      while(str[x]=='#')
      {
        x++;
        while(str[x]!='*')
        {
          msg[k++]=str[x++];
        }
      }
      x++;
    }
    msg[k]='\0';
    lcd.clear();
    lcd.print(msg);
    delay(1000);
    temp=0;
    i=0;
    x=0;
    k=0;
  }
  }
  lcd.scrollDisplayLeft();
}
void serialEvent()
{
  while(Serial.available())
  {
    char ch=(char)Serial.read();
    str[i++]=ch;
    if(ch == '*')
    {
      temp=1;
      lcd.clear();
      lcd.print("Message Received");
      delay(1000);
    }
  }
}

void gsm_init()
{
  lcd.clear();
  lcd.print("Finding Module..");
  boolean at_flag=1;
  while(at_flag)
  {
    Serial.println("AT");
    while(Serial.available()>0)
    {
      if(Serial.find("OK"))
      at_flag=0;
    }
    delay(1000);
  }

  lcd.clear();
  lcd.print("Module Connected..");
  delay(1000);
  lcd.clear();
  lcd.print("Disabling ECHO");
  boolean echo_flag=1;
  while(echo_flag)
  {
    Serial.println("ATE0");
    while(Serial.available()>0)
    {
      if(Serial.find("OK"))
      echo_flag=0;
    }
    delay(1000);
  }

  lcd.clear();
  lcd.print("Echo OFF");
  delay(1000);
  lcd.clear();
  lcd.print("Finding Network..");
  boolean net_flag=1;
  while(net_flag)
  {
    Serial.println("AT+CPIN?");
    while(Serial.available()>0)
    {
      if(Serial.find("+CPIN: READY"))
      net_flag=0;
    }
    delay(1000);
  }
  lcd.clear();
  lcd.print("Network Found..");
  delay(1000);
  lcd.clear();}
                           

Credits

msr048

msr048

0 projects • 32 followers

Comments

Add projectSign up / Login