In this section, we will write the basic Arduino sketch for interacting with the GSM module. The following sketch has been written to dial a phone number as well as to send a text message via SMS.
The following sketch can be downloaded from the online location mentioned in the Chapter 1, Boot Camp of this book:
// Include the software serial library
// Alternately you can directly use the hardware serial
// via (Arduino's digital pins D0 and D1)
#include <SoftwareSerial.h>
// Define the two pins that will be connected
// between the Arduino Uno and the GSM module
// D2 is connected to RXD pin of the GSM module
// So D2 will be simulated as the Tx pin on the Arduino
#define SIM800_RXD 2
// D4 is connected to TXD pin of the GSM module
// So D4 will be simulated as the Rx pin on the Arduino
#define SIM800_TXD 4
// Define the object for using the...