Usage Example for Arduino-Make Phone Calls

Last revision 2026/01/15

This tutorial guides users through the process of making phone calls with Arduino using the SIM808 expansion shield, providing detailed steps and sample code.

Hardware Preparation

Software Preparation

Steps

  1. Insert a SIM card in to the SIM slot on the SIM808 expansion shield
  2. Stack the expansion shield on to an Arduino UNO
  3. Connect an external power source to the Arduino
  4. Set the function switch to None
  5. Upload the sample code
  6. Set the function switch to Arduino and make sure SIM808 could communicate with Arduino board
  7. Press the Boot power button
  8. Wait for the SIM card to register the network, the Net indicator LED will slowly flash every 3 seconds
  9. Open the SIM808_CallUp example or copy the following code to your IDE
  10. Input your SIM's phone number in the line:#define PHONE_NUMBER "187******39"
  11. Upload the code and set the function switch to Arduino

Sample Code


  #include <DFRobot_sim808.h>

  //Mobile phone number, need to change
  #define PHONE_NUMBER  "187******39"

  DFRobot_SIM808 sim808(&Serial);

  void setup() {
    //mySerial.begin(9600);
    Serial.begin(9600);
    //********Initialize sim808 module*************
    while(!sim808.init()) {
        delay(1000);
        Serial.print("Sim808 init error\r\n");
    }
    Serial.println("Sim808 init success");
    Serial.println("Start to call ...");

    //*********Call specified number***************
    sim808.callUp(PHONE_NUMBER);
  }
  void loop() {
    //nothing to do
  }

Was this article helpful?

TOP