pyupm_nrf24l01 module¶
-
class
pyupm_nrf24l01.
NRF24L01
(cs, ce)[source]¶ Bases:
object
API for the NRF24L01 Transceiver Module.
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
C++ includes: nrf24l01.hpp
-
getData
(data)[source]¶ void getData(uint8_t *data)
Sinks all the arrived data into a provided buffer
data: Pointer to the buffer
-
init
(chipSelect, chipEnable)[source]¶ void init(int chipSelect, int chipEnable)
Initializes needed GPIO pins and SPI
chipSelect: Sets up the chip select pin
chipEnable: Sets up the chip enable pin
-
m_bleBuffer
¶
-
m_rxBuffer
¶
-
m_txBuffer
¶
-
pollListener
()[source]¶ void pollListener()
Pulling the method listening for the arrived data, dataRecievedHandler is triggered if data arrives
-
send
(*args)[source]¶ void send()
Sends the data located in an inner bufer; the user must fill the m_txBuffer buffer
-
sendBeaconingMsg
(msg)[source]¶ void sendBeaconingMsg(uint8_t *msg)
Beacons the provided message to BLE scanners.
msg: Beacons the provided message (max length is 16 bytes)
-
setBeaconingMode
()[source]¶ void setBeaconingMode()
Configures the NRF24L01 transceiver to behave as a BLE (Bluetooth Low Energy) beaconing devcie.
-
setBroadcastAddress
(addr)[source]¶ void setBroadcastAddress(uint8_t *addr)
Sets a broadcasting address
addr: 5-byte address
-
setDataReceivedHandler
(call_obj)[source]¶ void setDataReceivedHandler(Callback *call_obj)
Sets the handler to be called when data has been received
call_obj: Object used for callback - Java
-
setDestinationAddress
(addr)[source]¶ void setDestinationAddress(uint8_t *addr)
Sets a recipient address. The nrfSend method sends the data buffer to this address
addr: 5-byte address
-
setPayload
(load)[source]¶ void setPayload(uint8_t load)
Sets the payload size
load: Size of the payload (MAX 32)
-