GSM Sim800l

A library for Arduino

GSM Sim800l Arduino Library

Star
Fork

News!!

Mail: cristiansteib@gmail.com

Copyright (c) 2016 Cristian Steib

-How to send Sms with the library?


#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
}
    

-How to read Sms with the library?


#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
}
    

Installation

  1. Download the library from the website.
  2. Extract the Sim800l file, then rename the folder to Sim800l.
  3. Move the Sim800l folder to your sketch folder, /libraries/ .. or go to the Arduino IDE, select Sketch>>Import Library>>add library... restart the IDE.

AT commands and reference

If you are interested to see more details about the module you can read the Manual.

AT Command Manual (PDF File

How to use??

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.

Img 1:
image circuit
Img 2:
image module