rn4870
2.0.0.0
|
RN4870 Click carries the RN4870 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 Rn4870 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 Rn4870 Click driver.
void rn4870_cfg_setup ( rn4870_cfg_t *cfg );
RN4870_RETVAL rn4870_init ( rn4870_t *ctx, rn4870_cfg_t *cfg );
uint8_t rn4870_read ( rn4870_t *ctx, uint8_t *process_buffer );
void rn4870_receive ( rn4870_t *ctx, char tmp );
void rn4870_connect ( rn4870_t *ctx, char *p_addr );
This example reads and processes data from RN4870 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.