I am trying to call using SIM900A GSM module. But i don't know how to read from GSM module?
I mean to say if i send AT+CPIN? to check SIM status, then GSM module send some data. How to get it on Arduino and check it? Is it Ready or not?
Code :
#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("AT+CPIN?");
delay(50);
mySerial.println("ATD9712492679;");
Serial.println("Called ATD9712492679;");
}
void loop() // run over and over
{
// print response over serial port
if (mySerial.available())
Serial.write(mySerial.read());
}