[LoRaWAN] improve examples
This commit is contained in:
parent
3df866e23d
commit
84bb8da036
2 changed files with 1 additions and 9 deletions
|
@ -89,14 +89,6 @@ void setup() {
|
||||||
while(true);
|
while(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(state == RADIOLIB_ERR_NONE) {
|
|
||||||
Serial.println(F("success!"));
|
|
||||||
} else {
|
|
||||||
Serial.print(F("failed, code "));
|
|
||||||
Serial.println(state);
|
|
||||||
while(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// counter to keep track of transmitted packets
|
// counter to keep track of transmitted packets
|
||||||
|
|
|
@ -152,7 +152,7 @@ void loop() {
|
||||||
String strUp = "Hello World! #" + String(fcntUp);
|
String strUp = "Hello World! #" + String(fcntUp);
|
||||||
|
|
||||||
// send a confirmed uplink to port 10 every 64th frame
|
// send a confirmed uplink to port 10 every 64th frame
|
||||||
if(fcntUp / 64 == 0) {
|
if(fcntUp % 64 == 0) {
|
||||||
state = node.uplink(strUp, 10, true);
|
state = node.uplink(strUp, 10, true);
|
||||||
} else {
|
} else {
|
||||||
state = node.uplink(strUp, 10);
|
state = node.uplink(strUp, 10);
|
||||||
|
|
Loading…
Add table
Reference in a new issue