TOP Contributors

  1. MIKROE (2663 codes)
  2. Alcides Ramos (358 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (112 codes)
  5. Chisanga Mumba (90 codes)
  6. S P (73 codes)
  7. dany (71 codes)
  8. MikroBUS.NET Team (35 codes)
  9. NART SCHINACKOW (34 codes)
  10. Armstrong Subero (27 codes)

Most Downloaded

  1. Timer Calculator (137082 times)
  2. FAT32 Library (70223 times)
  3. Network Ethernet Library (56095 times)
  4. USB Device Library (46418 times)
  5. Network WiFi Library (42034 times)
  6. FT800 Library (41378 times)
  7. GSM click (29109 times)
  8. mikroSDK (26557 times)
  9. PID Library (26487 times)
  10. microSD click (25486 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

LR click

Rating:

0

Author: MIKROE

Last Updated: 2024-04-03

Package Version: 2.1.0.12

mikroSDK Library: 2.0.0.0

Category: LoRa

Downloaded: 213 times

Not followed.

License: MIT license  

LR Click is a compact add-on board that contains a low-power, long-range transceiver. This board features the RN2483, RF technology-based SRD transceiver, which operates at a frequency of 433/868MHz from Microchip Technology. This Click board™ features an embedded LoRaWAN Class A compliant stack, providing a long-range spread spectrum communication with high interference immunity. The RN2483 module is a fully certified 433/868MHz European R&TTE directive assessed radio modem combined with the advanced and straightforward command interface.

No Abuse Reported

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

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

Do you want to report abuse regarding "LR click".

  • Information
  • Comments (0)

mikroSDK Library Blog


LR click

LR Click is a compact add-on board that contains a low-power, long-range transceiver. This board features the RN2483, RF technology-based SRD transceiver, which operates at a frequency of 433/868MHz from Microchip Technology. This Click board™ features an embedded LoRaWAN Class A compliant stack, providing a long-range spread spectrum communication with high interference immunity. The RN2483 module is a fully certified 433/868MHz European R&TTE directive assessed radio modem combined with the advanced and straightforward command interface.

lr_click.png

click Product page


Click library

  • Author : Stefan Ilic
  • Date : Feb 2023.
  • Type : UART type

Software Support

We provide a library for the LR Click as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.

Package can be downloaded/installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.

Library Description

This library contains API for LR Click driver.

Standard key functions :

  • lr_cfg_setup Config Object Initialization function.

    void lr_cfg_setup ( lr_cfg_t *cfg );
  • lr_init Initialization function.

    err_t lr_init ( lr_t *ctx, lr_cfg_t *cfg );
  • lr_default_cfg Click Default Configuration function.

    void lr_default_cfg ( lr_t *ctx, bool cb_default, void ( *response_p )( char *response ) );

Example key functions :

  • lr_mac_tx Function for writing mac parameters

    uint8_t lr_mac_tx ( lr_t *ctx, lr_mac_t *mac );
  • lr_join Function for setting join mode

    uint8_t lr_join ( lr_t *ctx, char *join_mode, char *response );
  • lr_tick_conf Timer Configuration

    void lr_tick_conf ( lr_t *ctx, uint32_t timer_limit );

Example Description

This example shows the usage of the LR Click board by transmitting and receiving data.

The demo application is composed of two sections :

Application Init

IInitializes the driver and performs default configuration and reads System version.


void application_init ( void ) 
{
    log_cfg_t log_cfg;  /**< Logger config object. */
    lr_cfg_t lr_cfg;  /**< Click config object. */

    /** 
     * Logger initialization.
     * Default baud rate: 115200
     * Default log level: LOG_LEVEL_DEBUG
     * @note If USB_UART_RX and USB_UART_TX 
     * are defined as HAL_PIN_NC, you will 
     * need to define them manually for log to work. 
     * See @b LOG_MAP_USB_UART macro definition for detailed explanation.
     */

    LOG_MAP_USB_UART( log_cfg );
    log_init( &logger, &log_cfg );
    log_info( &logger, " Application Init " );

    // Click initialization.
    lr_cfg_setup( &lr_cfg );
    LR_MAP_MIKROBUS( lr_cfg, MIKROBUS_1 );
    if ( UART_ERROR == lr_init( &lr, &lr_cfg ) ) 
    {
        log_error( &logger, " Communication init." );
        for ( ; ; );
    }

    lr_default_cfg( &lr, 0, 0 );

    lr_cmd( &lr, LR_CMD_SYS_GET_VER, resp_buf );
    log_printf( &logger, "System VER: %s \r\n", resp_buf );

    lr_cmd( &lr, LR_CMD_MAC_PAUSE, resp_buf );
    log_printf( &logger, "MAC PAUSE: %s \r\n", resp_buf );

    lr_cmd( &lr, LR_CMD_RADIO_SET_WDT, resp_buf );
    log_printf( &logger, "RADIO SET WDT 0: %s \r\n", resp_buf );

    log_info( &logger, " Application Task " );
}

Application Task

Transmitter mode - sends one-by-one byte sequence of the desired message each second and checks if it is sent successfully Receiver mode - displays all the received characters on USB UART.


void application_task ( void ) 
{
    lr_process( );

#ifdef DEMO_APP_RECEIVER
    char *ptr;
    uint8_t int_data;
    if ( LR_OK == lr_rx( &lr, LR_ARG_0, resp_buf ) ) 
    {
        resp_buf[ 12 ] = 0;
        ptr = ( char* ) &int_data;
        hex_to_int( &resp_buf[ 10 ], ptr );
        log_printf( &logger, "%c", int_data  );
    }
#endif
#ifdef DEMO_APP_TRANSMITTER
    for ( uint8_t cnt = 0; cnt < 9; cnt++ ) 
    {
        int8_to_hex( send_message[ cnt ], send_hex );
        if ( LR_OK == lr_tx( &lr, &send_hex[ 0 ] ) ) 
        {
            log_printf( &logger, " Response : %s \r\n", resp_buf );
        }
        Delay_ms ( 1000 );
    }
#endif
}

The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.

Other Mikroe Libraries used in the example:

  • MikroSDK.Board
  • MikroSDK.Log
  • Click.LR

Additional notes and informations

Depending on the development board you are using, you may need USB UART click, USB UART 2 Click or RS232 Click to connect to your PC, for development systems with no UART to USB interface available on the board. UART terminal is available in all MikroElektronika compilers.


ALSO FROM THIS AUTHOR

Mikromedia 4 for STM32F7 Capacitive

0

This project contains example for testing modules on Mikromedia 4 for STM32F7 Capacitive.

[Learn More]

TempHum 3 click

0

Temp&Hum 3 click is a smart environmental temperature and humidity sensor Click board™, packed with features which allow easy and simple integration into any design that requires accurate and reliable humidity and temperature measurements

[Learn More]

Wifi CC3000 Camera Client

1

This code shows how to use the Net_Wireless_CC3000 library to connect to camera server, and download image.

[Learn More]