|
1 | 1 | Sim800L Arduino Library revised
|
2 | 2 | =====
|
3 | 3 |
|
| 4 | +The SIM800L Arduino Library is a simple and easy-to-use library for the SIM800L module, allowing for quick and efficient communication with the module using the Arduino platform. |
4 | 5 |
|
5 |
| -The purpose of this library is to simplify and speed up the use of the SIM800L module for Arduino. |
6 | 6 |
|
| 7 | +Features |
| 8 | +--- |
| 9 | + |
| 10 | +* Simplifies the initialization and configuration of the SIM800L module |
| 11 | +* Provides a set of easy-to-use functions for sending and receiving SMS messages |
| 12 | +* Supports making and receiving phone calls |
| 13 | +* Includes example sketches to demonstrate the library's capabilities |
| 14 | + |
| 15 | + |
| 16 | +Installation |
| 17 | +--- |
7 | 18 |
|
| 19 | +You can install the Sim800L Arduino Library in the Arduino IDE by going to Sketch > Include Library > Manage Libraries, searching for "Sim800L" and clicking on the "install" button. |
| 20 | +Alternatively, you can download the library files from the GitHub repository and install it by going to Sketch > Include Library > Add .ZIP Library and selecting the downloaded files. |
8 | 21 |
|
9 |
| -Contributions |
| 22 | + |
| 23 | +Usage |
10 | 24 | ---
|
11 | 25 |
|
12 |
| -I'm currently looking for more collaborators - feel free to submit your pull request to grow this open-source project! |
| 26 | +To use the library, simply include the library in your sketch and create an instance of the SIM800L class. The library provides a set of functions for sending and receiving SMS messages, making and receiving phone calls, and more. |
| 27 | + |
| 28 | +For example, to send an SMS message, you can use the following code: |
| 29 | +``` |
| 30 | +#include <Sim800L.h> |
| 31 | +
|
| 32 | +Sim800L Sim800L(10, 11); // RX_PIN and TX_PIN |
| 33 | +
|
| 34 | +void setup(){ |
| 35 | + Sim800L.begin(4800); |
| 36 | + Sim800L.sendSms("+1234567890","Hello world!"); |
| 37 | +} |
| 38 | +
|
| 39 | +void loop(){ |
| 40 | + //do nothing |
| 41 | +} |
| 42 | +``` |
13 | 43 |
|
14 | 44 |
|
15 | 45 |
|
16 |
| -Connections |
| 46 | +Collaboration |
17 | 47 | ---
|
18 | 48 |
|
| 49 | +This is an open-source project and I'm currently looking for more collaborators to help grow and improve it. If you're interested, feel free to submit your pull request to the GitHub repository. |
19 | 50 |
|
20 |
| -Arduino | Sim800L | Notes |
21 |
| --------------|------------------|------------ |
22 |
| -+5v| (3.8v)~(4.4v)!| Power supply input |
23 |
| -10 RX_PIN | TX | |
24 |
| -11 TX_PIN | RX | |
25 |
| -2 RESET_PIN | RST| Reset Pin |
26 |
| -GND | GND | |
| 51 | + |
| 52 | +Connecting the SIM800L to the Arduino |
| 53 | +--- |
| 54 | + |
| 55 | +Before you can use the Sim800L Arduino Library, you need to physically connect the SIM800L module to your Arduino board. |
| 56 | + |
| 57 | +1. Connect the SIM800L's GND pin to the GND pin on the Arduino board |
| 58 | +2. Connect the SIM800L's VCC pin to the 3.3V pin on the Arduino board |
| 59 | +3. Connect the SIM800L's RX pin to the TX pin on the Arduino board (default is pin 11) |
| 60 | +4. Connect the SIM800L's TX pin to the RX pin on the Arduino board (default is pin 10) |
| 61 | +5. Connect the SIM800L's RST pin to the RESET pin on the Arduino board (default is pin 2) |
| 62 | + |
| 63 | +It is important to note that the SIM800L module requires a stable power supply of at least 2A, it is strongly recommended to use an external power supply to power the SIM800L module. |
| 64 | +The SIM800L's VCC pin should be connected to the 3.3V pin on the Arduino board. Connecting it to the 5V pin may damage the module as it operates on 3.3V voltage level. It is important to ensure the voltage level is compatible with the module's specifications to avoid any damage. |
27 | 65 |
|
28 | 66 |
|
29 |
| -Functions |
| 67 | +Function List |
30 | 68 | ---
|
31 | 69 |
|
| 70 | +Here is a list of functions that can be called on an instance of the SIM800L class: |
32 | 71 |
|
33 | 72 | Name|Return|Notes
|
34 | 73 | :-------|:-------:|:-----------------------------------------------:|
|
35 |
| -begin()|None|Initialize the library |
36 |
| -begin(number)|None|Initialize the library with user's baud rate |
| 74 | +begin()|None|Initialize the module with a defalt baud rate |
| 75 | +begin(number)|None|Initialize the module with a custom baud rate |
37 | 76 | reset()|None|Reset the module, and wait to Sms Ready.
|
38 | 77 | setSleepMode(bool)|bool|enable or disable sleep mode. If it returns true, there is an error.
|
39 | 78 | getSleepMode()|bool|return sleep mode status. If it returns true, there is an error.
|
@@ -66,8 +105,13 @@ ________________________________________________________________________________
|
66 | 105 |
|
67 | 106 |
|
68 | 107 |
|
69 |
| -Credits |
| 108 | +License |
70 | 109 | ---
|
71 | 110 |
|
| 111 | +The Sim800L Arduino Library revised by Vittorio Esposito is open-source software and is licensed under the MIT License. |
| 112 | + |
| 113 | + |
| 114 | +Credits |
| 115 | +--- |
72 | 116 |
|
73 | 117 | Original version of the library by: [Cristian Steib] (https://github.com/cristiansteib)
|
0 commit comments