#include <RF24Network.h>
uint8_t myKey[16] = {1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6};
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)
void setKey(uint8_t key[CCM_KEY_SIZE])
void enableDynamicPayloads(uint8_t payloadSize=DEFAULT_MAX_PAYLOAD_SIZE)