Problem with nrf24l01 code

(deleted)

  myRadio.write(&data, sizeof(data));

  Serial.print("X_Left:");
  Serial.print(data.X1);
  Serial.print("    Y_Left:");
  Serial.print(data.Y1);
  Serial.print("    X_Right:");
  Serial.print(data.X2);
  Serial.print("    Y_Right:");
  Serial.print(data.Y2);
  Serial.print("    Function:");
  Serial.println(data.F);
  data.X1 = analogRead(A0);
  data.Y1 = analogRead(A1);
  data.X2 = analogRead(A2);
  data.Y2 = analogRead(A3);
  data.F = analogRead(A4);

Send some data. Print some data. Get some data.

Don't those steps seem to be in the wrong order?

(deleted)

kennyslav:
it worked fine, so I edited code for two joystics, but now arduinos doesn't connect.

You have posted the program code but you have not told us what was happening when it "worked fine" nor have you told us what you mean by "doesn't connect" or how you know that.

Disconnecting CE and CSN would be brainless.

The pair of programs in this link may be useful. They use the TMRh20 version of the RF24 library which solves some problems from the ManiacBug version

...R

(deleted)

There is no connection between nRF24L01 modules, beside the acknowledgement.

kennyslav:
Yes, I know, that disconnecting CE and CSN is brainless, but when i did it, the LED (out4) turned on.

SPI is reading junk from the empty SPI bus.

Have you tried the code I linked to?

Have you a 10µF capacitor between Vcc and GND close to the nRF24?

...R

(deleted)

(deleted)