Skip to content

Instantly share code, notes, and snippets.

@dkrkamesh
Created January 17, 2017 09:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dkrkamesh/d90cf29e1ce59e9e6f8ae9edfc2d2870 to your computer and use it in GitHub Desktop.
Save dkrkamesh/d90cf29e1ce59e9e6f8ae9edfc2d2870 to your computer and use it in GitHub Desktop.
GSM module: Code for Calling using SoftwareSerial
/*
The circuit:
* RX is digital pin 10 (connect to TX of GSM Modem)
* TX is digital pin 11 (connect to RX of GSM Modem)
*/
#include <SoftwareSerial.h>
SoftwareSerial mySerial(10, 11); // RX, TX
void setup()
{
// Open serial communications and wait for port to open:
Serial.begin(9600);
Serial.println("Calling through GSM Modem");
// set the data rate for the SoftwareSerial port
mySerial.begin(9600);
delay(2000);
mySerial.println("ATD81290255XX;"); // ATD81290255XX; -- watch out here for semicolon at the end!!
Serial.println("Called ATD81290255XX");
}
void loop() // run over and over
{
// print response over serial port
if (mySerial.available())
Serial.write(mySerial.read());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment