O'Reilly logo

Learn Arduino Prototyping in 10 days by Kallol Bosu Roy Choudhuri

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required