TOP Contributors

  1. MIKROE (2659 codes)
  2. Alcides Ramos (356 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (112 codes)
  5. Chisanga Mumba (90 codes)
  6. S P (73 codes)
  7. dany (71 codes)
  8. MikroBUS.NET Team (35 codes)
  9. NART SCHINACKOW (34 codes)
  10. Armstrong Subero (27 codes)

Most Downloaded

  1. Timer Calculator (136986 times)
  2. FAT32 Library (70099 times)
  3. Network Ethernet Library (56023 times)
  4. USB Device Library (46344 times)
  5. Network WiFi Library (41961 times)
  6. FT800 Library (41274 times)
  7. GSM click (29051 times)
  8. mikroSDK (26489 times)
  9. PID Library (26447 times)
  10. microSD click (25411 times)
Libstock prefers package manager

Package Manager

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]

< Back
mikroSDK Library

BLE 4 click

Rating:

5

Author: MIKROE

Last Updated: 2019-10-02

Package Version: 1.0.0.0

mikroSDK Library: 1.0.0.0

Category: BT/BLE

Downloaded: 3402 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.

No Abuse Reported

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".

  • mikroSDK Library 2.0.0.0
  • Comments (0)
DOWNLOAD LINK RELATED COMPILER CONTAINS
mikroBasic PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc

mikroSDK Library Blog

BLE 4 click

BLE 4 click

Native view of the BLE 4 click board.

View full image
BLE 4 click

BLE 4 click

Front and back view of the BLE 4 click board.

View full image

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 :

  • 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();
    }
}

Other mikroE Libraries used in the example:

  • UART

Additional notes and informations

Depending on the development board you are using, you may need USB UART clickUSB 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.

ALSO FROM THIS AUTHOR

Ambient 8 click

0

Ambient 8 click is equipped with the ambient light sensor (ALS) IC, providing measurements of the ambient light intensity in a digital format. It utilizes the LTR-329ALS-01, an ALS with the I2C interface.

[Learn More]

I2C Isolator 3 click

0

I2C Isolator 3 Click is a compact add-on board that offers completely isolated bidirectional communication. This board features the CPC5902, a dual optically isolated bidirectional logic-bus repeater from IXYS Integrated Circuits Division.

[Learn More]

Color 6 click

0

Color 6 click is a very accurate color sensing Click board™ which features the AS73211, an XYZ true color sensor from ams.

[Learn More]