Monday, April 27, 2015

Nrf24l01

nRF24L01 MySensors

Build a mesh-enabled radio network between your sensors using the MySensors NRF24L01 Arduino Library. The MySensors website also contains easy-to-follow build instructions and Arduino examples to help you create your own wireless sensors.

An Arduino port of the tinkerer.eu library. It works with the Sparkfun nRF24L01+ modules. Note: This library supports a small (but useful) subset of the features provided by the nRF24L01 chip. Also see github repository

bool dataReady(void) Is there data ready to be received.

void getData(byte *data) Get the received data. 'data' should be an array of bytes Mirf.payload long.

void send(byte *data) Send data. 'data' should be Mirf.payload bytes long.

bool isSending(void) Return true if still trying to send. If the chip is still in transmit mode then this method will return the chip to receive mode.

NB: Lots more information is available from the status registers regarding acknolagement or failure status. See Mirf.cpp:218.

bool rxFifoEmpty(void) Is the RX Fifo Empty. bool txFifoEmpty(void) Is the TX Fifo Empty.

byte getStatus(void) Return the status register.

void powerUpRx(void) Power up chip and set to receive mode. Also clear sending interrupts. void powerUpTx(void) Power up tx mode.

Source

0 comments:

Post a Comment