Interfacing GSM Modem with arduino | GSM arduino code |



code:-

void setup()

{

 Serial.begin(9600);

}



void loop()

{

   Serial.print("AT\r\n");

  delay(1000);

 Serial.print("ATE0\r\n");

 delay(1000);

  Serial.print("AT+CMGF=1\r\n");

  delay(1000);

  Serial.print("AT+CMGS=");

  delay(1000);

  Serial.print('"');

  Serial.print("mobile number");

  Serial.print('"');

  Serial.print('\n');

  Serial.print('\r');

  delay(1000);

  Serial.print("Happy Independence Day");

  delay(100);

  Serial.print((char)26);

    Serial.print(0x1a); 

    while(1);



}


Comments