Update RadioLib

This commit is contained in:
lewisxhe
2024-09-19 11:12:36 +08:00
parent 210367a171
commit 5794daa8aa
301 changed files with 115546 additions and 12703 deletions
@@ -2,7 +2,7 @@
RadioLib SX127x Transmit with Frequency Hopping Example
This example transmits packets using SX1278 LoRa radio module.
Each packet contains up to 256 bytes of data, in the form of:
Each packet contains up to 255 bytes of data, in the form of:
- Arduino String
- null-terminated char array (C-string)
- arbitrary binary data (byte array)
@@ -56,7 +56,7 @@ int transmissionState = RADIOLIB_ERR_NONE;
// this is the packet that will be sent
String longPacket = "Let's create a really long packet to trigger \
lots of hop interrupts. A packet can be up to 256 bytes long. \
lots of hop interrupts. A packet can be up to 255 bytes long. \
This packet is 222 bytes so using sf = 9, bw = 125, timeOnAir is \
1488ms. 1488ms / (9*4.10ms) = 40 hops. Counter: ";
@@ -93,7 +93,7 @@ void setup() {
} else {
Serial.print(F("failed, code "));
Serial.println(state);
while (true);
while (true) { delay(10); }
}
// set hop period in symbols
@@ -104,14 +104,14 @@ void setup() {
} else {
Serial.print(F("failed, code "));
Serial.println(state);
while (true);
while (true) { delay(10); }
}
// set the function to call when transmission is finished
radio.setDio0Action(setTxFlag);
radio.setDio0Action(setTxFlag, RISING);
// set the function to call when we need to hcange frequency
radio.setDio1Action(setFHSSFlag);
// set the function to call when we need to change frequency
radio.setDio1Action(setFHSSFlag, RISING);
// start transmitting the first packet
Serial.print(F("[SX1278] Sending first packet ... "));