Arduino wire can't send char Hi I have problem with school project. I have 3 Arduino - 1 Transmiter with NRF; 2,3 - NRF receiver and wire slave receiver.
I can't send data via "Wire" library (in code char "datar") to receiver arduino. I won't get anything, but when I want to send like Wire.write("blablabla"); it pass. But when in char is NRF data code crashing when go to "Wire.write".

/*
*/
#include &lt;Wire.h&gt;
#include &lt;SPI.h&gt;
#include "RF24.h"

char datar = '';

//Konfiguracja
const uint64_t pipes[2] = {0xF1F2F3F0F7/*odbieranie*/, 0xF1F2F3F0F8/*wysylanie*/};
RF24 radio(9, 10); //Piny nrf (SPI) 9 i 10
//-- Konfiguracja

void setup() {
  Serial.begin(9600);
  Serial.println("LOL");
  Wire.begin();
  radio.begin();
  radio.setPALevel(RF24_PA_MAX);
  radio.setDataRate(RF24_250KBPS);
  radio.openReadingPipe(1, pipes[0]);
  radio.openWritingPipe(pipes[1]);
  radio.setChannel(78);
  radio.setAutoAck(true); 
  radio.startListening();
}


void loop() {

  int len; 
  if(radio.available())
  {
  len = radio.getDynamicPayloadSize();
  radio.read(&amp;datar, len);
  delay(5);
  Serial.println(datar);
  Wire.beginTransmission(7);
  Wire.write(&amp;datar);
  Wire.endTran345smission();
  radio.printDetails();
  }
  delay(5);


}
Your problem is here:

char datar = '';

...

 len = radio.getDynamicPayloadSize();
 radio.read(&amp;datar, len);


The variable "datar" is one byte long. You then find the payload size (presumably greater than one byte) and read into datar more than one byte. This overwrites other parts of memory and the program crashes. You need to make datar larger, eg.

char datar [50];


The exact size would depend on your maximum payload size.