Skip to content

maximilianhofmeister1/LilyGo-T-Call-Easy-Sim800-Library

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

LilyGo-T-Call-Easy-Sim800-Library

This library should be an easy and reliable way for beginners to simply use the Sim800 basic functionalitys of LilyGo's T-Call Sim800 board.

Note

For more information regarding the LilyGo T-Call Sim800 Module visit the GitHub-Repository LilyGo-T-Call-SIM800


Functions included:

  • start()
  • shutdown()
  • isActive()
  • getSignalQuality()
  • sendSMS()
  • sendATCommand() -> to unlock all functionality of the module. See AT-Command Manual
  • more coming soon ...

How to use the Library in your projects:

  1. add all 3 files to your source-directory of your project
  2. include SimModule.h
  3. Initialize the SimModule with the HardwareSerial: SimModule module(&Serial2);
  4. begin the Serial Transmission: Serial2.begin(115200, SERIAL_8N1, 26, 27);
  5. start the module: module.start();
  6. eventually active debug output: module.set_debug(true);
  7. You're ready to go! (For further help see demo-code below)

Demo Code

#include <Arduino.h>
#include <SimModule.h> //include SimModule

SimModule module(&Serial2); // Initialize the SimModule with Serial2

void setup() {
    Serial.begin(9600); // Initialize Serial for debugging
    Serial2.begin(115200, SERIAL_8N1, 26, 27); // Initialize Serial2 for the SIM module

    module.start(); // Power-On the SIM module

    module.set_debug(true); //optional: Enable debug output
    module.set_debug_serial(&Serial); //optional: Set the debug serial to Serial for output
}

void loop() {
    Serial.println(module.isActive()); // Check if the SIM module is active and ready to use

    Serial.println(module.getSignalQuality()); // Get the signal quality of the SIM module in a human-readable format

    Serial.println(module.sendATCommand("AT+CBC")); // Send a custom AT command to the SIM module, that returns the response (e.g. battery status)
    
    module.sendSMS("+49123456789", "Hello from ESP32!"); // Send an SMS message using the SIM module

    module.shutdown(); //optional: Power down the SIM module (to save power when not in use)

    delay(10000);
}

About

easy to use library to kickstart the use of Sim800 module of LilyGo's Board

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published