rn4871
2.0.0.0
|
RN4871 Click carries the RN4871 Bluetooth® 4.2 low energy module from Microchip.The Click is designed to run on a 3.3V power supply. It uses ASCII Command Interface over UART for communication with target microcontroller, with additional functionality provided by the following pins on the mikroBUS™ line: RST, CS, and INT.
We provide a library for the Rn4871 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 form compilers IDE(recommended way), or downloaded from our LibStock, or found on mikroE github account.
This library contains API for Rn4871 Click driver.
void rn4871_cfg_setup ( rn4871_cfg_t *cfg );
RN4871_RETVAL rn4871_init ( rn4871_t *ctx, rn4871_cfg_t *cfg );
uint8_t rn4871_read ( rn4871_t *ctx, uint8_t *process_buffer );
void rn4871_receive ( rn4871_t *ctx, char tmp );
void rn4871_connect ( rn4871_t *ctx, char *p_addr );
This example reads and processes data from RN4871 clicks.
The demo application is composed of two sections :
Initializes UART driver. Initializes device and parser.
If 'MASTER' - connects to 'SLAVE', sends message and disconnects. If 'SLAVE' - waits for connect request and message from 'MASTER' and LOGs received message.
The full application code, and ready to use projects can be installed directly form compilers IDE(recommneded) or found on LibStock page or mikroE GitHub accaunt.
Other mikroE Libraries used in the example:
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. The terminal available in all Mikroelektronika compilers, or any other terminal application of your choice, can be used to read the message.