BLE 4 Click Board
BLE 4 Click Board
The BLE 4 Click Board™ is a fully embedded stand-alone Bluetooth 5.0 low energy connectivity module, equipped with the NINA-B312, an ultra-small, high-performing, standalone Bluetooth low energy module for easy integration of Bluetooth low energy connectivity (BLE) into various electronic devices. This module combines a high-performance Arm® Cortex®-M4 CPU microprocessor with FPU and state-of-the-art power performance. Reliable and easy to use, the BLE 4 Click Board™ is a perfect solution for the development of various IoT applications, smart home applications, BLE enabled toys, advanced robotics, and other similar applications.
The BLE 4 Click Board™ is supported by a mikroSDK compliant library, which includes functions that simplify software development. This Click Board™ comes as a fully tested product, ready to be used on a system equipped with the mikroBUS™ socket.
Software Support
We provide a library for the BLE 4 Click Board™ on our LibStock page, as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Library Description
The library covers all the necessary functions to control the BLE 4 Click Board™. A library performs the communication with the NINA-B312-00B series Bluetooth® 5 low energy module via UART interface.
Key Functions
void ble4_uartWrite( uint8_t *txData )
- UART write function.void ble4_setDeviceName( uint8_t *deviceName )
- Set device name setting function.uint8_t ble4_readByte()
- Read Single Byte.
Example Description
The application is composed of three sections :
- System Initialization - Initializes UART, sets AN and INT pin as input and RST, CS and PWM pin as output and start to write log.
- Application Initialization - Initialization driver enables - UART, hardware reset BLE module, restores factory settings of the module, set device name, select data mode and start to send data.
- Application Task - (code snippet) - This is an example which demonstrates the use of BLE 4 Click board. If 'READ' - repeatedly sends string "mikroE". If 'WRITE' - receives messages from NINA-B3 series Bluetooth® 5 low energy module and LOGs received message. Results are being sent to the Usart Terminal where you can track their changes.
void applicationTask() { char tmp; uint8_t rdyFlag; if ( moduleMode == _BLE4_READ_MODE ) { rdyFlag = ble4_byteReady(); if ( 1 == rdyFlag ) { tmp = ble4_readByte(); mikrobus_logWrite( &tmp, _LOG_BYTE ); } } else if ( moduleMode == _BLE4_WRITE_MODE ) { for ( cnt = 0; cnt < 9; cnt++ ) { ble4_writeByte( MESSAGE_DATA[ cnt ] ); Delay_1sec(); } Delay_1sec(); } }
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
- UART
Additional Notes and Information
Depending on the development board you are using, you may need a 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.
MIKROSDK
The BLE 4 Click Board™ is supported with mikroSDK - MikroElektronika Software Development Kit. To ensure proper operation of mikroSDK compliant Click board™ demo applications, mikroSDK should be downloaded from the LibStock and installed for the compiler you are using.
BLE 4 Click Board
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.