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
- DFR0181 Arduino UNO x1
- TEL0097 SIM808 Expansion Shield x1
- External Power Supply x1
- SIM Card x1
Software Preparation
-
Download and install the Arduino IDE: Click to download Arduino IDE
-
Download DFRobot_SIM808 library Click to Download DFRobot_SIM808 library
Steps
- Insert a SIM card in to the SIM slot on the SIM808 expansion shield
- Stack the expansion shield on to an Arduino UNO
- Connect an external power source to the Arduino
- Set the function switch to
None - Upload the sample code
- Set the function switch to
Arduinoand make sure SIM808 could communicate with Arduino board - Press the Boot power button
- Wait for the SIM card to register the network, the Net indicator LED will slowly flash every 3 seconds
- Open the SIM808_CallUp example or copy the following code to your IDE
- Input your SIM's phone number in the line:
#define PHONE_NUMBER "187******39" - 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?
