A library for Arduino
#include <Sim800l.h>
#include <SoftwareSerial.h>
Sim800l Sim800l; //declare the library
char* text;
char* number;
bool error;
void setup(){
Sim800l.begin();
text="Testing Sms";
number="+542926556644";
error=Sim800l.sendSms(number,text);
// OR
//error=Sim800l.sendSms("+540111111111","the text go here");
}
void loop(){
//do nothing
}
#include <Sim800l.h>
#include <SoftwareSerial.h>
Sim800l Sim800l;
String text;
uint8_t index;
void setup(){
Serial.begin(9600); // only for debug the results .
Sim800l.begin(); // initializate the library.
index=1; // first position in the prefered memory storage.
text=Sim800l.readSms(index);
Serial.println(text);
}
void loop(){
//do nothing
}
If you are interested to see more details about the module you can read the Manual.
AT Command Manual (PDF File
First of all you need to know some things.
-As the module use 3.8v to 4.2v, you would be needing a voltage regulator to make sure you are not overtaking the voltage, or the module will be damaged.
-The pinout shown in Imag 1.
-The reset pin must be connected to transistor NPN wich is attached to Arduino, in the imag 1 shown an example of the circuit.
-Be sure that gnd is common with arduino, this is the most common issue when not respond as expected.