I am trying to extract my sensor data from my raspberry Pi using the nrf24l01 + network receiver.
I am sending it from an Arduino board. Here is the setup of my Arduino:
STATUS = 0x0e RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=7 TX_FULL=0
RX_ADDR_P0-1 = 0xcccccc3ccc 0xcccccc3c3c
RX_ADDR_P2-5 = 0x33 0xce 0x3e 0xe3
TX_ADDR = 0xcccccccc3c
RX_PW_P0-6 = 0x20 0x20 0x20 0x20 0x20 0x20
EN_AA = 0x3e
EN_RXADDR = 0x3f
RF_CH = 0x5a
RF_SETUP = 0x07
CONFIG = 0x0f
DYNPD/FEATURE = 0x3f 0x04
Data Rate = 1MBPS
Model = nRF24L01+
CRC Length = 16 bits
PA Power = PA_MAX
My Raspberry Pi is connected to nrf24l01 + via GPIO. I made sure the connection is ok using the C ++ example specified at https://github.com/TMRh20/RF24 :
RF24 radio(RPI_BPLUS_GPIO_J8_15,RPI_BPLUS_GPIO_J8_24, BCM2835_SPI_SPEED_8MHZ);
The data is in order. Now I want to use the nodeJS program to get this data. I use this library: https://github.com/natevw/node-nrf
The code is very simple, but somehow it does not work (the console is disabled):
var spiDev = "/dev/spidev0.0";
var cePin = 15;
var irqPin = null;
var channel = 0x5a;
var radio = require('nrf').connect(spiDev, cePin, irqPin);
radio
.channel(channel)
.dataRate('1Mbps')
.crcBytes(1)
;
radio.begin(function () {
var rx = radio.openPipe('rx', 0xcccccccc3c);
rx.pipe(process.stdout);
});
I am wondering what I am doing wrong. The hardware is ok and the setup seems pretty good, what do you think?
thank