Skip to content

Commit

Permalink
examples don't use deprecated begin(channel, addr)
Browse files Browse the repository at this point in the history
  • Loading branch information
2bndy5 committed Aug 11, 2021
1 parent 1794450 commit 5b8a9bf
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 11 deletions.
3 changes: 2 additions & 1 deletion examples/Network_Ping/Network_Ping.ino
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ void setup() {
}
}
radio.setPALevel(RF24_PA_HIGH);
network.begin(/*channel*/ 100, /*node address*/ this_node );
radio.setChannel(100);
network.begin(/*node address*/ this_node);
}

void loop() {
Expand Down
3 changes: 2 additions & 1 deletion examples/Network_Ping_Sleep/Network_Ping_Sleep.ino
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ void setup() {
}
}
radio.setPALevel(RF24_PA_HIGH);
network.begin(/*channel*/ 100, /*node address*/ this_node );
radio.setChannel(100);
network.begin(/*node address*/ this_node);

/******************************** This is the configuration for sleep mode ***********************/
network.setup_watchdog(wdt_1s); //The watchdog timer will wake the MCU and radio every second to send a sleep payload, then go back to sleep
Expand Down
3 changes: 2 additions & 1 deletion examples/Network_Priority_RX/Network_Priority_RX.ino
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ void setup() {
// hold in infinite loop
}
}
network.begin(/*channel*/ 90, /*node address*/ this_node);
radio.setChannel(90);
network.begin(/*node address*/ this_node);
radio.printDetails();

}//setup
Expand Down
3 changes: 2 additions & 1 deletion examples/Network_Priority_TX/Network_Priority_TX.ino
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ void setup() {
// hold in infinite loop
}
}
network.begin(/*channel*/ 90, /*node address*/ this_node);
radio.setChannel(90);
network.begin(/*node address*/ this_node);
radio.printDetails();

// Load our data buffer with numbered data
Expand Down
3 changes: 2 additions & 1 deletion examples/helloworld_rx/helloworld_rx.ino
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ void setup(void) {
// hold in infinite loop
}
}
network.begin(/*channel*/ 90, /*node address*/ this_node);
radio.setChannel(90);
network.begin(/*node address*/ this_node);
}

void loop(void) {
Expand Down
3 changes: 2 additions & 1 deletion examples/helloworld_rx_advanced/helloworld_rx_advanced.ino
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ void setup(void) {
// hold in infinite loop
}
}
network.begin(/*channel*/ 90, /*node address*/ this_node);
radio.setChannel(90);
network.begin(/*node address*/ this_node);

printf_begin(); // needed for RF24* libs' internal printf() calls
radio.printDetails(); // requires printf support
Expand Down
3 changes: 2 additions & 1 deletion examples/helloworld_tx/helloworld_tx.ino
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ void setup(void) {
// hold in infinite loop
}
}
network.begin(/*channel*/ 90, /*node address*/ this_node);
radio.setChannel(90);
network.begin(/*node address*/ this_node);
}

void loop() {
Expand Down
3 changes: 2 additions & 1 deletion examples/helloworld_tx_advanced/helloworld_tx_advanced.ino
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ void setup(void) {
// hold in infinite loop
}
}
network.begin(/*channel*/ 90, /*node address*/ this_node);
radio.setChannel(90);
network.begin(/*node address*/ this_node);
radio.printDetails();

// Load our data buffer with numbered data
Expand Down
3 changes: 2 additions & 1 deletion examples_RPi/helloworld_rx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ int main(int argc, char **argv)
}

delay(5);
network.begin(/*channel*/ 90, /*node address*/ this_node);
radio.setChannel(90);
network.begin(/*node address*/ this_node);
radio.printDetails();

while (1) {
Expand Down
3 changes: 2 additions & 1 deletion examples_RPi/helloworld_tx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ int main(int argc, char **argv)
}

delay(5);
network.begin(/*channel*/ 90, /*node address*/ this_node);
radio.setChannel(90);
network.begin(/*node address*/ this_node);
radio.printDetails();

while (1) {
Expand Down
3 changes: 2 additions & 1 deletion examples_RPi/rx-test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ int main(int argc, char **argv)
radio.setRetries(7, 7);

delay(5);
network.begin(/*channel*/ 100, /*node address*/ this_node);
radio.setChannel(100);
network.begin(/*node address*/ this_node);
radio.printDetails();

while (1) {
Expand Down

0 comments on commit 5b8a9bf

Please sign in to comment.