User Manual

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
Examples
MakePhoneCalls
ThisexampletestsDFRobot_SIM808SIM808GPS/GPRS/GSMShield'scallUpfunction.
1.OpentheSIM808_CallUpexampleorcopythefollowingcodetoyourIDE
2.InputyourSIM'sphonenumberintheline``#definePHONE_NUMBER"187******39"``
3.Uploadthecodeandsetthefunctionswitchto`Arduino`
#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
}
SendSMSMessages
ThisexampleteststheDFRobot_SIM808GPS/GPRS/GSMshield'ssendSMSfunctions
1.OpentheSIM808_SendSMSexampleorcopythecodetoyourproject
2.InputyourSIM'sphonenumberintheline``#definePHONE_NUMBER"187******39"``
3.Setthefunctionswitchto`Arduino`
#include<DFRobot_sim808.h>
//Mobilephonenumber,needtochange
#definePHONE_NUMBER"187*******39"
//Thecontentofmessagessent
#defineMESSAGE"hello,world"
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sendmessage...");
//********definephonenumberandtext**********
sim808.sendSMS(PHONE_NUMBER,MESSAGE);
}
voidloop(){
//nothingtodo
}
AutoAnsweringPhoneCallsandReadingSMSMessages