ludiazv / node-nrf24

nRF24 (nrf24l01/nrfl24l01+) radios in the nodejs way
MIT License
39 stars 15 forks source link

Sending fails, wrong pin? #34

Open JockeyDoe opened 2 years ago

JockeyDoe commented 2 years ago

Hi, I am not able to send or receive anything.

 var rf24 = new nrf24.nRF24(19, 0);
    rf24.begin();

    rf24.config({
      PALevel: nrf24.RF24_PA_MAX,
      DataRate: nrf24.RF24_1MBPS,
      Irq: 16
    });

    console.log(rf24.present());

    var data = Buffer.from("Turn LED on");
    rf24.useWritePipe("0xF0F0F0F0E1", true);
    console.log(rf24.write(data));

    rf24.destroy();

Output:

true
0

The wiring is correct, but the second output tells me nothing was sent. Also my receiver doesn't receive any data.

Is it possible, my code doesn't work because I am using another CE Pin?

ludiazv commented 2 years ago

CE selectable. I see that you are using GPIO19. Try to use other pin as in the RPI this pin is also used for the second SPI interface (MISO signal). Maybe there is some conflict if the kernel is actualy managing these SPI interface.

Also for troubleshooting is better to disable IRQ signal in config (Irq:-1).

See here:

image