NRF24L01 Class
- ID: nrf24l01
- Name: NRF Transceiver
- Category: wifi
- Manufacturer: seeed sparkfun
- Link: http://www.seeedstudio.com/depot/nRF24L01Module-p-1394.html
- Connection: spi
id This module defines the NRF24L01 interface for libnrf24l01
Item Index
Methods
- NRF24L01
- name
- init
- configure
- send
- send
- setSourceAddress
- setDestinationAddress
- setBroadcastAddress
- setPayload
- setDataReceivedHandler
- dataReady
- dataSending
- getData
- getStatus
- rxFifoEmpty
- rxPowerUp
- rxFlushBuffer
- txPowerUp
- powerDown
- setChannel
- setPower
- setSpeedRate
- txFlushBuffer
- pollListener
- ceHigh
- ceLow
- csOn
- csOff
- setBeaconingMode
- sendBeaconingMsg
Methods
NRF24L01
-
cs
-
ce
Instantiates an NRF24l01 object
Parameters:
-
cs
NumberChip select pin
-
ce
Numberundefined
Returns:
name
()
String
Returns the name of the component
Returns:
init
-
chipSelect
-
chipEnable
Initializes needed GPIO pins and SPI
Parameters:
-
chipSelect
NumberSets up the chip select pin
-
chipEnable
NumberSets up the chip enable pin
configure
()
Configures the NRF24L01 transceiver
send
-
value
Sends the buffer data
Parameters:
-
value
Uint8_t *Pointer to the buffer
send
()
Sends the data located in an inner bufer; the user must fill the m_txBuffer buffer
setSourceAddress
-
addr
Sets a receiving address of the device
Parameters:
-
addr
Uint8_t *5-byte address
setDestinationAddress
-
addr
Sets a recipient address. The nrfSend method sends the data buffer to this address
Parameters:
-
addr
Uint8_t *5-byte address
setBroadcastAddress
-
addr
Sets a broadcasting address
Parameters:
-
addr
Uint8_t *5-byte address
setPayload
-
load
Sets the payload size
Parameters:
-
load
NumberSize of the payload (MAX 32)
setDataReceivedHandler
-
call_obj
Sets the handler to be called when data has been received
Parameters:
-
call_obj
CallbackObject used for callback - Java
dataReady
()
Boolean
Checks if the data has arrived
Returns:
dataSending
()
Boolean
Checks if the transceiver is in the sending mode
Returns:
getData
-
data
Sinks all the arrived data into a provided buffer
Parameters:
-
data
Uint8_t *Pointer to the buffer
getStatus
()
Number
Checks the transceiver state
Returns:
rxFifoEmpty
()
Boolean
Checks if the receive stack is empty
Returns:
rxPowerUp
()
Powers the receiver up
rxFlushBuffer
()
Flushes the receive stack
txPowerUp
()
Powers the transmitter up
powerDown
()
Powers everything down
setChannel
-
channel
Parameters:
-
channel
Numberundefined
setPower
-
power
Parameters:
-
power
Power_tundefined
setSpeedRate
-
rate
Parameters:
-
rate
Speed_rate_tundefined
Returns:
txFlushBuffer
()
Flushes the transmit stack
pollListener
()
Pulling the method listening for the arrived data, dataRecievedHandler is triggered if data arrives
ceHigh
()
Mraa::Result
Sets the chip enable pin to HIGH
Returns:
ceLow
()
Mraa::Result
Sets the chip enable pin to LOW
Returns:
csOn
()
Mraa::Result
Sets the chip select pin to LOW
Returns:
csOff
()
Mraa::Result
Sets the chip select pin to HIGH
Returns:
setBeaconingMode
()
Configures the NRF24L01 transceiver to behave as a BLE (Bluetooth Low Energy) beaconing devcie.
sendBeaconingMsg
-
msg
Beacons the provided message to BLE scanners.
Parameters:
-
msg
Uint8_t *Beacons the provided message (max length is 16 bytes)
Properties
m_rxBuffer
Number
Receive buffer
m_txBuffer
Number
Transmit buffer
m_bleBuffer
Number
BLE buffer