#include <RF24Network.h>
RF52Network network(radio);
const uint16_t this_node = 00;
const uint16_t other_node = 01;
struct payload_t {
unsigned long ms;
unsigned long counter;
};
void setup(void) {
Serial.begin(115200);
while (!Serial) {
}
Serial.println(F("RF24Network/examples/helloworld_rx/"));
Serial.println(F("Radio hardware not responding!"));
while (1) {
}
}
network.begin( this_node);
}
void loop(void) {
network.update();
while (network.available()) {
RF24NetworkHeader header;
payload_t payload;
network.read(header, &payload, sizeof(payload));
Serial.print(F("Received packet: counter="));
Serial.print(payload.counter);
Serial.print(F(", origin timestamp="));
Serial.println(payload.ms);
}
}
Driver class for nRF52840 2.4GHz Wireless Transceiver.
void setChannel(uint8_t channel)