pyupm_nrf24l01 module

class pyupm_nrf24l01.Callback[source]

Bases: object

run()[source]

virtual void run(clbk_data arg)

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

ceHigh()[source]

mraa::Result ceHigh()

Sets the chip enable pin to HIGH

ceLow()[source]

mraa::Result ceLow()

Sets the chip enable pin to LOW

configure()[source]

void configure()

Configures the NRF24L01 transceiver

csOff()[source]

mraa::Result csOff()

Sets the chip select pin to HIGH

csOn()[source]

mraa::Result csOn()

Sets the chip select pin to LOW

dataReady()[source]

bool dataReady()

Checks if the data has arrived

dataSending()[source]

bool dataSending()

Checks if the transceiver is in the sending mode

getData(data)[source]

void getData(uint8_t *data)

Sinks all the arrived data into a provided buffer

data: Pointer to the buffer

getStatus()[source]

uint8_t getStatus()

Checks the transceiver state

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
name()[source]

std::string name()

Returns the name of the component

pollListener()[source]

void pollListener()

Pulling the method listening for the arrived data, dataRecievedHandler is triggered if data arrives

powerDown()[source]

void powerDown()

Powers everything down

rxFifoEmpty()[source]

bool rxFifoEmpty()

Checks if the receive stack is empty

rxFlushBuffer()[source]

void rxFlushBuffer()

Flushes the receive stack

rxPowerUp()[source]

void rxPowerUp()

Powers the receiver up

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

setChannel(channel)[source]

void setChannel(uint8_t channel)

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)

setPower(power)[source]

void setPower(power_t power)

setSourceAddress(addr)[source]

void setSourceAddress(uint8_t *addr)

Sets a receiving address of the device

addr: 5-byte address

setSpeedRate(rate)[source]

uint8_t setSpeedRate(speed_rate_t rate)

txFlushBuffer()[source]

void txFlushBuffer()

Flushes the transmit stack

txPowerUp()[source]

void txPowerUp()

Powers the transmitter up

pyupm_nrf24l01.generic_callback(callback)[source]

void generic_callback(Callback *callback)

class pyupm_nrf24l01.uint8Array(nelements)[source]

Bases: object

cast()[source]
static frompointer()