GSM module sketch

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 ...

Get Learn Arduino Prototyping in 10 days now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.