system
12
// libraries
#include <GSM.h>
#include "SoftwareSerial.h"
#define rxPin 3
#define txPin 2
SoftwareSerial mySerial = SoftwareSerial(rxPin, txPin);
//Pin definition
#define GSM_ON 6
#define GSM_RESET 7
// initialize the library instance
GSM gsmAccess; // include a 'true' parameter for debug enabled
GSMVoiceCall vcs;
GSM_SMS sms;
int i;
String remoteNumber = "+2348099142370";
char charbuffer[20]; // Array to hold the number for the incoming call
void setup()
{
// initialize serial communications and wait for port to open:
pinMode(rxPin, INPUT);
pinMode(txPin, OUTPUT);
// set the data rate for the SoftwareSerial port
Serial.begin(9600);
pinMode(GSM_ON, OUTPUT); // pin 6-Gboard
pinMode(GSM_RESET, OUTPUT); // pin 7-Gboard
// connection state
boolean notConnected = true;
// Start GSM shield
while(notConnected)
{
if(GSM_READY)
notConnected = false;
else
{
Serial.println("Not connected");
delay(1000);
}
}