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]
Rating:
Author: MIKROE
Last Updated: 2019-10-02
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: BT/BLE
Downloaded: 3781 times
Not followed.
License: MIT license
BLE 4 Click is 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.
Do you want to subscribe in order to receive notifications regarding "BLE 4 click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "BLE 4 click" changes.
Do you want to report abuse regarding "BLE 4 click".
Library Description
The library covers all the necessary functions to control 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.Examples description
The application is composed of three sections :
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();
}
}
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.