Hi, I've put that into my reciever code. Here is that code:
#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
RF24 radio(7, 8); // CE, CSN
const byte address[6] = "00001";
void setup() {
Serial.begin(9600);
radio.begin();
radio.openReadingPipe(0, address);
radio.setPALevel(RF24_PA_MIN);
radio.startListening();
}
void loop() {
if (radio.available()) {
struct Data {
float temperature;
float pressure;
float altitude;
float humidity;
} allData;
radio.read(&allData, sizeof(allData));
Serial.write((byte*)&allData, sizeof(allData));
}
}
And here is some of the output from it:
