Skip to content

Commit 249a29f

Browse files
committed
Change version to 2.1.0
1 parent b7ae611 commit 249a29f

File tree

2 files changed

+15
-22
lines changed

2 files changed

+15
-22
lines changed

README.md

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
<!-- PROJECT SHIELDS -->
2-
[![GitHub issues](https://img.shields.io/github/issues/chandrawi/LoRaRF-Arduino)](https://github.com/chandrawi/LoRaRF-Arduino/issues)
3-
[![GitHub forks](https://img.shields.io/github/forks/chandrawi/LoRaRF-Arduino)](https://github.com/chandrawi/LoRaRF-Arduino/network)
4-
[![GitHub stars](https://img.shields.io/github/stars/chandrawi/LoRaRF-Arduino)](https://github.com/chandrawi/LoRaRF-Arduino/stargazers)
5-
[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/chandrawi/LoRaRF-Arduino)](https://github.com/chandrawi/LoRaRF-Arduino/tree/2.0.0)
2+
[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/chandrawi/LoRaRF-Arduino)](https://github.com/chandrawi/LoRaRF-Arduino/releases)
63
[![GitHub license](https://img.shields.io/github/license/chandrawi/LoRaRF-Arduino)](https://github.com/chandrawi/LoRaRF-Arduino/blob/main/LICENSE)
74

85
# LoRa-RF Arduino Library
@@ -41,7 +38,7 @@ git clone https://github.com/chandrawi/LoRaRF-Arduino.git
4138

4239
To work with the library, first you must include `SX126x` header or `SX127x` header depending LoRa module you use. For LLCC68 include SX126x header. Then initialize class in the header by creating an object.
4340

44-
```C++
41+
```c++
4542
// for SX126x series or LLCC68
4643
#include <SX126x.h>
4744
SX126x LoRa;
@@ -53,7 +50,7 @@ SX127x LoRa;
5350

5451
Before calling any configuration methods, doing transmit or receive operation you must call `begin()` method. You can call `begin()` method inside Arduino `setup()` function.
5552

56-
```C++
53+
```c++
5754
void setup() {
5855
LoRa.begin();
5956
// configuration code goes here
@@ -89,15 +86,15 @@ The default Arduino pins used for connecting to SX126x and SX127x are as follows
8986
### SPI Port Configuration
9087

9188
To change Arduino default SPI port or SPI frequency call `setSPI()` method before `begin()` method.
92-
```C++
93-
LoRa.setSPI(SPI2, F_CPU/2);
89+
```c++
90+
LoRa.setSPI(SPI2, 16000000);
9491
LoRa.begin();
9592
```
9693

9794
### I/O Pins Configuration
9895

9996
To configure I/O pins (NSS, RESET, BUSY, IRQ, TXEN, RXEN pin) call `setPins()` before `begin()` method.
100-
```C++
97+
```c++
10198
// set NSS->10, RESET->9, BUSY->4, DIO1->2, TXEN->8, RXEN->7 for SX126x series
10299
LoRa.setPins(10, 9, 2, 4, 8, 7);
103100
// set NSS->10, RESET->9, DIO0->2, TXEN->8, RXEN->7 for SX127x series
@@ -111,7 +108,7 @@ Before transmit or receive operation you can configure transmit power and receiv
111108

112109
### Transmit Power
113110

114-
```C++
111+
```c++
115112
// set transmit power to +22 dBm for SX1262
116113
LoRa.setTxPower(22, SX126X_TX_POWER_SX1262);
117114
// set transmit power to +20 dBm for SX127x series using boost pin
@@ -120,7 +117,7 @@ LoRa.setTxPower(20, SX127X_TX_POWER_PA_BOOST);
120117

121118
### Receive Gain
122119

123-
```C++
120+
```c++
124121
// set receive gain to power saving
125122
LoRa.setRxGain(LORA_RX_GAIN_POWER_SAVING);
126123
// set receive gain to boosted and AGC on for SX127x series
@@ -129,28 +126,28 @@ LoRa.setRxGain(LORA_RX_GAIN_BOOSTED, true);
129126

130127
### Frequency
131128

132-
```C++
129+
```c++
133130
// Set frequency to 915 Mhz
134131
LoRa.setFrequency(915000000);
135132
```
136133

137134
### Modulation Parameter
138135

139-
```C++
136+
```c++
140137
// set spreading factor 8, bandwidth 125 kHz, coding rate 4/5, and low data rate optimization off
141138
LoRa.setLoRaModulation(8, 125000, 5, false);
142139
```
143140

144141
### Packet Parameter
145142

146-
```C++
143+
```c++
147144
// set explicit header mode, preamble length 12, payload length 15, CRC on and no invert IQ operation
148145
LoRa.setLoRaPacket(LORA_HEADER_EXPLICIT, 12, 15, true, false);
149146
```
150147

151148
### Synchronize Word
152149

153-
```C++
150+
```c++
154151
// Set syncronize word for public network (0x3444)
155152
LoRa.setSyncWord(0x3444);
156153
```
@@ -159,7 +156,7 @@ LoRa.setSyncWord(0x3444);
159156

160157
Transmit operation begin with calling `beginPacket()` method following by `write()` method to write package to be tansmitted and ended with calling `endPacket()` method. For example, to transmit "HeLoRa World!" message and an increment counter you can use following code.
161158

162-
```C++
159+
```c++
163160
// message and counter to transmit
164161
char message[] = "HeLoRa World!";
165162
uint8_t counter = 0;
@@ -177,7 +174,7 @@ For more detail about transmit operation, please visit this [link](https://githu
177174

178175
Receive operation begin with calling `request()` method following by `read()` method to read received package. `available()` method can be used to get length of remaining package. For example, to receive message and a counter in last byte you can use following code.
179176

180-
```C++
177+
```c++
181178
LoRa.request();
182179
LoRa.wait();
183180

@@ -197,10 +194,6 @@ For more detail about receive operation, please visit this [link](https://github
197194

198195
See examples for [SX126x](https://github.com/chandrawi/LoRaRF-Arduino/tree/main/examples/SX126x), [SX127x](https://github.com/chandrawi/LoRaRF-Arduino/tree/main/examples/SX127x), and [simple network implementation](https://github.com/chandrawi/LoRaRF-Arduino/tree/main/examples/Network).
199196

200-
## License
201-
202-
This library published under [MIT license](https://github.com/chandrawi/LoRaRF-Arduino/blob/main/LICENSE).
203-
204197
## Contributor
205198

206199
[Chandra Wijaya Sentosa](https://github.com/chandrawi) <<[email protected]>>

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# library.properties
22
name=LoRaRF
3-
version=2.0.0
3+
version=2.1.0
44
author=Chandra Wijaya Sentosa <[email protected]>
55
maintainer=Chandra Wijaya Sentosa <[email protected]>
66
sentence=Arduino LoRa-RF library used for transmitting and receiving data using LoRa module with Semtech SX126x series, SX127x series, or LLCC68.

0 commit comments

Comments
 (0)