#include <Wire.h>
#include <LiquidCrystal.h>
#include <SoftwareSerial.h>
SoftwareSerial mySerial(2, 3);
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 7, 6, 5, 4);
char inchar=0;
int ledpin = 13;
void setup()
{
mySerial.begin(9600); // the GPRS baud rat
Serial.begin(9600); // the GPRS baud rate
mySerial.println("AT");
delay(1000); // give time to log on to network.
mySerial.println("AT+CMGF=1\r");
delay(1000);
mySerial.println("AT+CNMI=2,2,0,0,0\r");
pinMode(ledpin,OUTPUT);
digitalWrite(ledpin,LOW);
lcd.begin(16, 2);
lcd.print(" AHMAD AMINULAH");
}
void loop()
{
if (mySerial.available()>0)
{
inchar=mySerial.read();
Serial.print(inchar);
}
if (Serial.available())
mySerial.write(Serial.read());
}
void clearScreen()
{
lcd.setCursor(0,0);
lcd.print(" ");
lcd.setCursor(0,1);
lcd.print(" ");
}