lriot 2.1.0.0
main.c File Reference

LR IoT Click example. More...

#include "board.h"
#include "log.h"
#include "lriot.h"
#include "conversions.h"

Macros

#define DEMO_APP_TRANSMITTER
 

Functions

void application_init (void)
 
void application_task (void)
 
int main (void)
 

Detailed Description

LR IoT Click example.

Description

This example demonstrates the use of LR IoT click board by reading a GNSS and WiFi scanning results and displaying it on the USB UART. In the case of a tranceive firmware the communication between two devices over LoRa will be demonstrated as well.

The demo application is composed of two sections :

Application Init

Initializes the driver, performs the click default configuration, and after that reads and displays the chip's firmware information. In the case you need to update or change the default firmware refer to the LRIOT_UPDATE_FIRMWARE and LRIOT_FIRMWARE_SELECTOR macro definition.

Application Task

There are 3 types of the example:

  1. Modem firmware: reads a GNSS and WiFi scanning results and displays them on the USB UART.
  2. Transcever firmware (application mode transmitter ): reads a GNSS and WiFi scanning results as well as the chip internal temperature and sends specific LoRa messages containing that information to the LoRa receiver.
  3. Transcever firmware (application mode receiver): reads all incoming LoRa packets and displays them on the USB UART.
Author
Stefan Filipovic

Macro Definition Documentation

◆ DEMO_APP_TRANSMITTER

#define DEMO_APP_TRANSMITTER

Function Documentation

◆ application_init()

void application_init ( void )

< Logger config object.

< 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 LOG_MAP_USB_UART macro definition for detailed explanation.

◆ application_task()

void application_task ( void )

◆ main()

int main ( void )