Use your forum account to login.

LOGIN

TOP Contributors

  1. MikroElektronika Team (664 codes)
  2. Shawon Shahryiar (258 codes)
  3. Alcides Ramos Zambrano (164 codes)
  4. Dany (66 codes)
  5. S P (63 codes)
  6. MikroBUS.NET Team (35 codes)
  7. NART SCHINACKOW (34 codes)
  8. FOURNET Olivier (25 codes)
  9. Alberto Trasimeni (25 codes)
  10. Roman Toropov (25 codes)

Most Downloaded

  1. Timer Calculator (91134 times)
  2. FAT32 Library (47150 times)
  3. Network Ethernet Library (43470 times)
  4. USB Device Library (33761 times)
  5. Network WiFi Library (31281 times)
  6. FT800 Library (26476 times)
  7. GSM click (21156 times)
  8. PID Library (21049 times)
  9. microSD click - Example (17347 times)
  10. GSM 2 click (14195 times)
Libstock prefers package manager

Package Manager

We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]

< Back
mikroSDK Library

LoRa 2 click

Rating:

6

Author: MikroElektronika Team

Last Updated: 2018-05-30

Category: Communication

Downloaded: 590 times

Not followed.

LoRa 2 click is a LoRa RF technology based SRD transceiver, which operates at a sub-gigahertz frequency of 915MHz. The main active element of the LoRa 2 click the RN2903, low-power long range LoRa technology transceiver module, from Microchip which features LoRaWAN Class A compliant stack.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "LoRa 2 click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "LoRa 2 click" changes.

Do you want to report abuse regarding "LoRa 2 click".

  • Information
  • Comments (1)
DOWNLOAD LINK RELATED COMPILER CONTAINS
mikroBasic PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc

mikroSDK Library Blog

LoRa 2 click

LoRa 2 click

Native view of the LoRa 2 click board.

View full image
LoRa 2 click

LoRa 2 click

Front and back view of the LoRa 2 click board.

View full image

Library Description

The library covers all functionalities of the Click board through simplified API calls.

Key functions:

  • uint8_t lora2_tx( char *buffer ) - Transmits the function, sends the message provided using the buffer.
  • uint8_t lora2_rx(char* window_size, char *response) - Receives the function, provides a message using the response buffer.
  • void lora2_process() - The library state machine must be placed inside an infinite loop.

Examples Description

The application is composed of three sections:

  • System Initialization - Initializes the UART module and CS pin, RST pin as output and INT pin as an input.
  • Application Initialization - Initializes the driver and the LoRa module found on Click board.
  • Application Task - (code snippet) - Can be used as a receiver or a transmitter. It is necessary to uncomment the appropriate part of the code. The transmitter sends one by one byte, each second, while the receiver receives the message using continuous mode and logs the received data on UART.
void applicationTask()
{
 lora2_process();

// RECEIVER
 rxState = lora2_rx( 0, &tmp_txt[0]);

 if (rxState == 0)
 {
 _data = xtoi(&tmp_txt[11]);
 mikrobus_logWrite( &_data,_LOG_BYTE);
 mikrobus_logWrite( " ",_LOG_LINE);
 }

// TRANSMITER
 for (cnt = 0; cnt < 7; cnt++)
 {
 send_data = sendMessage[cnt];
 IntToHex(send_data,sendHex);
 txState = lora2_tx( &sendHex[0] );

 if (txState == 0)
 {
 mikrobus_logWrite( " Response : ",_LOG_TEXT );
 mikrobus_logWrite( tmp_txt,_LOG_LINE );
 }
 Delay_1sec();
 }
}

Other mikroE Libraries used in the example:

  • UART
  • Conversions

Additional notes and information

Depending on the development board you are using, you may need USB UART clickUSB UART 2 click or RS232 click to connect to your PC, for development systems with no UART to USB interface available on the board. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.

 

ALSO FROM THIS AUTHOR

TouchClamp click

7

TouchClamp click is a mikroBUS add-on board with NXP’s MPR121 proximity capacitive touch sensor controller. TouchClamp click communicates with the target MCU through the mikroBUSINT pin and I2C interface ( SCL, SDA ). The board has an onboard ADDR. SEL. jumper for choosing I2C addresses. Designed to use a 3.3V power supply only.

[Learn More]

Thumbstick click

5

The joystick unit receives directional input in the x and y axes by way of two potentiometers connected to a stick. The mechanical pushbutton sends an interrupt signal to the microcontroller. TFT shows values.

[Learn More]

OOK TX click

5

OOK TX click is a simple wireless transmitter that operates at the frequency of 433MHz (sub-GHz). This device allows realization of a simple, low-speed wireless ad hoc communication network between a transmitter and compatible receiver, such as the OOK RX click.

[Learn More]