TOP Contributors

  1. MIKROE (2656 codes)
  2. Alcides Ramos (353 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 (136874 times)
  2. FAT32 Library (70000 times)
  3. Network Ethernet Library (55999 times)
  4. USB Device Library (46305 times)
  5. Network WiFi Library (41919 times)
  6. FT800 Library (41206 times)
  7. GSM click (29012 times)
  8. PID Library (26423 times)
  9. mikroSDK (26396 times)
  10. microSD click (25386 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: 3383 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

DC Motor 3 click

1

DC Motor 3 click is a mikroBUS add-on board with a Toshiba TB6549FG full-bridge driver for direct current motors. The IC is capable of outputting currents of up to 3.5 A with 30V, making it suitable for high-power motors. The click communicates with the target MCU through the mikroBUS PWM pin. Designed to use a 3.3 power supply only.

[Learn More]

Excelon-Ultra click

0

Excelon-Ultra Click is a compact add-on board that contains the most reliable nonvolatile memory. This board features the CY15B116QSN, a high-performance 16-Mbit nonvolatile memory that employs an advanced ferroelectric process from Infineon Technologies.

[Learn More]

Presence click

5

Presence click is an infrared sensing Click board which can be used for presence sensing, motion detection, and a remote overtemperature protection. Presence click is equipped with the TPiS 1S 1385, a thermophile sensor from CaliPile series.

[Learn More]