Send ECG signal with NRF24L01 from Arduino to Raspberry Pi 3 I'm using nRF24L01 to send ECG samples from an Arduino to Raspberry Pi, the type of sample is double after denoising, and I stock them in a byte[8] to send 8 by 8 sample. When I print the sample before stockage that show the good results, but if I print data stored in the byte the signal show a lot of fluctuations. In Raspberry Pi, I can read correctly byte data like transmitted, but if I send them in a vector of double or int in reception (python) don't give the same frame transmitted.

#include &lt;IIRFilter.h&gt;
#include &lt;FIRFilter.h&gt;

#include &lt;SPI.h&gt; // Call SPI Library 
#include &lt;nRF24L01.h&gt; // Call NRE Version Library
#include &lt;RF24.h&gt; // RF24 Header File

#define CE_PIN  9
#define CSN_PIN 10
const uint64_t pipe = 0xF0F0F0F0E1LL;
RF24 radio(CE_PIN, CSN_PIN);


const int ECG_samplefreq  = 200;//sampling frequcy
const int DC_offset = 511;


const double b_lp[] = {0.0026, 0.0155, 0.0388, 0.0517, 0.0388, 0.0155, 0.0026};
const double a_lp[] = {1.0000, -2.3797, 2.9104, -2.0551, 0.8779, -0.2099, 0.0218};


IIRFilter lp(b_lp, a_lp);
unsigned int i = 0;

void setup() {
  Serial.begin(9600);
  radio.begin();//Intializing NRF24L01 Module
  radio.setPALevel(RF24_PA_MAX);
  radio.setChannel(0x76);
  radio.openWritingPipe(pipe);// For Transmitting Operation, Must OpenWritingPipe
  radio.enableDynamicPayloads();
  radio.powerUp();
  pinMode(7, INPUT); // Setup for leads off detection LO +
  pinMode(8, INPUT); // Setup for leads off detection LO -

}
void loop() {
  const static unsigned long ECG_interval  = round(1e6 / ECG_samplefreq);  //sampling period = 5000 ms =&gt; 200 sample by 1 seconde
  static unsigned long ECG_prevmicros = micros();
  byte  s[8] = {0};

  if ((digitalRead(7) == 1) || (digitalRead(8) == 1)) {
    Serial.println('!');
  }

  else {
    for (int i = 0; i &lt; 8; i++)
    {

      if (!Serial) {
        ECG_prevmicros = micros();
      }
      else if (micros() - ECG_prevmicros &gt;= ECG_interval)
      {
        int value = analogRead(A5);
        double filtered = lp.filter( value - DC_offset);

        filtered = round( filtered + DC_offset);
        s[i] =  filtered
        Serial.println( s[i]);
        ECG_prevmicros += ECG_interval;

      }
    }
    radio.write(&amp;s, sizeof(s) ); // sending in real time ECG sample. 8 sample by transmission . 8 =&gt; 4 oct of one sampe = 32 oct by transmission.

  }
}


the problem thant i put in s[i] a double of four octs. im searching how can i send them whithout byte array, and receive the correctly. So thankful for your help
I see multiple flaws in your code:


radio.write(&amp;s, sizeof(s)); does not what you think it would. The correct statement would be radio.write(s, sizeof(s)); without the ampersand.
You are using double. Not using floating point numbers at all would be preferable.
Your s is of type byte. Thus it only holds 8 bytes. So your floating point calculations are being truncated to the range [0, 255]. From your problem description this is not what you are trying to achieve, I think.