Skip to content

Commit d1c21e3

Browse files
committed
Update documentation
1 parent a5500cd commit d1c21e3

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

docs/readme.md

+18-18
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
1-
# Arduino Cellular Library
1+
# 📡 Arduino Cellular Library
22

3-
4-
## Initialising
3+
## ⤵️ Initialising
54
This guide outlines the steps to establish cellular network connectivity using an Arduino equipped with a cellular modem. The process involves initializing the modem, setting necessary configurations, and establishing a connection to the network.
65

76
First, you need to include the ArduinoCellular library in your sketch. This library facilitates communication between your Arduino board and the cellular module.
87

9-
```c
8+
```cpp
109
#include <ArduinoCellular.h>
1110
```
1211

1312
Create an instance of the ArduinoCellular class. This instance will be used to interact with the cellular module.
1413

15-
```c
14+
```cpp
1615
ArduinoCellular cellular = ArduinoCellular();
1716
```
1817

1918
To begin, initialize the modem with basic configurations such as setting the modem to text mode, enabling intrrerupts etc. This is done by calling the begin() method on your cellular instance.
20-
```c
19+
```cpp
2120
cellular.begin();
2221
```
2322

24-
To connect to your mobile network and start a cellular data session, use the connect() method. This requires the APN (Access Point Name), login credentials (if any), and your SIM card's PIN number (if it's locked).
23+
To connect to your mobile network and start a cellular data session, use the connect() method. This requires the APN (Access Point Name) and login credentials (if any). You can unlock your SIM card's using its PIN number (if it's locked).
2524

26-
```c
27-
cellular.connect(SECRET_GPRS_APN, SECRET_GPRS_LOGIN, SECRET_GPRS_PASSWORD, SECRET_PINNUMBER);
25+
```cpp
26+
cellular.unlockSIM(SECRET_PINNUMBER)
27+
cellular.connect(SECRET_GPRS_APN, SECRET_GPRS_LOGIN, SECRET_GPRS_PASSWORD);
2828

2929
```
3030

@@ -33,7 +33,7 @@ Note: It's a best practice to store sensitive information like the GPRS APN, log
3333
**arduino_secrets.h**
3434
Create or edit the arduino_secrets.h file in your project directory and define the necessary secrets as follows:
3535

36-
```c
36+
```cpp
3737
#define SECRET_GPRS_APN "your_apn_here"
3838
#define SECRET_GPRS_LOGIN "your_login_here"
3939
#define SECRET_GPRS_PASSWORD "your_password_here"
@@ -43,7 +43,7 @@ Create or edit the arduino_secrets.h file in your project directory and define t
4343
Replace the placeholder values with the actual APN, login, password, and PIN number provided by your mobile network operator or SIM card provider.
4444
4545
46-
## Network
46+
## 🌐 Network
4747
The Arduino environment provides a set of classes designed to abstract the complexities of handling network communications. Among these, the Client class plays a crucial role as it defines a standard interface for network communication across various Arduino-compatible networking libraries.
4848
4949
The Arduino networking stack is designed to simplify the process of implementing network communication for IoT (Internet of Things) projects. This stack encompasses both hardware (e.g., Ethernet shields, WiFi modules) and software components (libraries that interface with the hardware). The stack is built in a way that allows sketches (Arduino programs) to communicate over the network using common protocols like TCP and UDP without needing to delve into the low-level mechanics of these protocols.
@@ -63,13 +63,13 @@ This layered approach is not only modular but also highly flexible, allowing dev
6363
6464
### Network Client (OSI Layer 3)
6565
Represents a basic client for network communication, suitable for protocols like TCP/IP.
66-
```c
66+
```cpp
6767
TinyGSMClient client = cellular.getNetworkClient();
6868
```
6969

7070
### Secure Network Client
7171
Adds a layer of security by implementing SSL/TLS encryption over the basic client.
72-
```c
72+
```cpp
7373
BearSSLClient secureClient = cellular.getSecureNetworkClient();
7474
```
7575

@@ -78,28 +78,28 @@ For convenience we added getters for http and https clients.
7878
### HTTP and HTTPS Clients:
7979
These are high-level clients designed for web communication. They abstract the complexities of HTTP/HTTPS protocols, making it easy to send web requests and process responses.
8080

81-
```c
81+
```cpp
8282
HttpClient http = cellular.getHTTPClient(server, port);
8383
HttpClient http = cellular.getHTTPSClient(server, port);
8484
```
8585

8686

8787

88-
## SMS
88+
## 📨 SMS
8989
The SMS functionality allows devices to exchange information with users or other systems through simple text messages, enabling a wide range of applications from remote monitoring to control systems or a fallback communication method when the others are not available.
9090

9191
### Reading SMS Messages
9292
**getReadSMS():** This method returns a vector containing SMS messages that have already been read. It's particularly useful for applications that need to process or display messages that have been acknowledged.
9393

94-
**getUnreadSMS(): **This method fetches a vector of unread SMS messages, allowing the application to process or notify users about new messages.
94+
**getUnreadSMS():** This method fetches a vector of unread SMS messages, allowing the application to process or notify users about new messages.
9595

9696
Each SMS message is represented as an instance of the `SMS` class, which contains the sender's number, the message text, and a timestamp marking when the message was received.
9797

9898

9999
### The SMS Class
100100
The SMS class serves as a container for information related to a single SMS message. It includes the following attributes:
101101

102-
* `number`: The phone number from which the SMS was sent.
102+
* `sender`: The phone number from which the SMS was sent.
103103
* `message`: The body of the SMS message.
104104
* `timestamp`: A timestamp indicating when the message was received by the module.
105105

@@ -115,7 +115,7 @@ The method sendSMS() is designed for this purpose, taking two parameters:
115115

116116
This functionality allows Arduino devices to communicate outwardly to users or other systems, sending alerts, data, or control commands via SMS.
117117

118-
## Time and Location
118+
## ⌚️📍 Time and Location
119119
These features enable precise tracking of device locations and ensure synchronized operations across different systems. This guide focuses on utilizing GPS and cellular network capabilities for location tracking and time synchronization. It's important to note that GPS functionality is exclusively available in the Global Version of the modem, highlighting the need for appropriate hardware selection based on the project requirements.
120120

121121
### GPS Location

0 commit comments

Comments
 (0)