TinyLoRa Class.
More...
#include <TinyLoRa.h>
|
void | setChannel (rfm_channels_t channel) |
| Sets the RFM channel. More...
|
|
void | setDatarate (rfm_datarates_t datarate) |
| Sets the RFM datarate. More...
|
|
void | setPower (int8_t Tx_Power=17) |
| Sets the TX power. More...
|
|
| TinyLoRa (int8_t rfm_dio0, int8_t rfm_nss, int8_t rfm_rst) |
| Instanciates a new TinyLoRa class, including assigning irq and cs pins to the RFM breakout. More...
|
|
bool | begin (void) |
| Initializes the RFM, including configuring SPI, configuring the frameCounter and txrandomNum. More...
|
|
void | sendData (unsigned char *Data, unsigned char Data_Length, unsigned int Frame_Counter_Tx, uint8_t Frame_Port=1) |
| Function to assemble and send a LoRaWAN package. More...
|
|
◆ TinyLoRa()
TinyLoRa::TinyLoRa |
( |
int8_t |
rfm_irq, |
|
|
int8_t |
rfm_nss, |
|
|
int8_t |
rfm_rst |
|
) |
| |
Instanciates a new TinyLoRa class, including assigning irq and cs pins to the RFM breakout.
- Parameters
-
rfm_irq | The RFM module's interrupt pin (rfm_nss). |
rfm_nss | The RFM module's slave select pin (rfm_nss). |
rfm_rst | The RFM module's reset pin (rfm_rst). |
◆ setChannel()
Sets the RFM channel.
- Parameters
-
channel | Which channel to send data |
◆ setDatarate()
Sets the RFM datarate.
- Parameters
-
datarate | Bandwidth and Frequency plan. |
◆ setPower()
void TinyLoRa::setPower |
( |
int8_t |
Tx_Power = 17 | ) |
|
Sets the TX power.
- Parameters
-
Tx_Power | How much TX power in dBm |
◆ begin()
bool TinyLoRa::begin |
( |
void |
| ) |
|
Initializes the RFM, including configuring SPI, configuring the frameCounter and txrandomNum.
- Returns
- True if the RFM has been initialized
◆ sendData()
void TinyLoRa::sendData |
( |
unsigned char * |
Data, |
|
|
unsigned char |
Data_Length, |
|
|
unsigned int |
Frame_Counter_Tx, |
|
|
uint8_t |
Frame_Port = 1 |
|
) |
| |
Function to assemble and send a LoRaWAN package.
- Parameters
-
*Data | Pointer to the array of data to be transmitted. |
Frame_Counter_Tx | Frame counter for transfer frames. |
Data_Length | Length of data to be sent. |
Frame_Port | Frame port to send data from, from 0 to 225. |
The documentation for this class was generated from the following files: