Update RadioLib
This commit is contained in:
@@ -81,7 +81,7 @@ void setup() {
|
||||
} else {
|
||||
Serial.print(F("failed, code "));
|
||||
Serial.println(state);
|
||||
while (true);
|
||||
while (true) { delay(10); }
|
||||
}
|
||||
|
||||
// set hop period in symbols
|
||||
@@ -92,14 +92,14 @@ void setup() {
|
||||
} else {
|
||||
Serial.print(F("failed, code "));
|
||||
Serial.println(state);
|
||||
while (true);
|
||||
while (true) { delay(10); }
|
||||
}
|
||||
|
||||
// set the function to call when reception is finished
|
||||
radio.setDio0Action(setRxFlag);
|
||||
radio.setDio0Action(setRxFlag, 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 listening for LoRa packets
|
||||
Serial.print(F("[SX1278] Starting to listen ... "));
|
||||
@@ -109,7 +109,7 @@ void setup() {
|
||||
} else {
|
||||
Serial.print(F("failed, code "));
|
||||
Serial.println(state);
|
||||
while (true);
|
||||
while (true) { delay(10); }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -123,7 +123,8 @@ void loop() {
|
||||
// you can also read received data as byte array
|
||||
/*
|
||||
byte byteArr[8];
|
||||
int state = radio.readData(byteArr, 8);
|
||||
int numBytes = radio.getPacketLength();
|
||||
int state = radio.readData(byteArr, numBytes);
|
||||
*/
|
||||
|
||||
if (state == RADIOLIB_ERR_NONE) {
|
||||
|
||||
Reference in New Issue
Block a user