TOP Contributors

  1. MIKROE (2663 codes)
  2. Alcides Ramos (358 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 (137090 times)
  2. FAT32 Library (70234 times)
  3. Network Ethernet Library (56112 times)
  4. USB Device Library (46434 times)
  5. Network WiFi Library (42053 times)
  6. FT800 Library (41384 times)
  7. GSM click (29111 times)
  8. mikroSDK (26560 times)
  9. PID Library (26489 times)
  10. microSD click (25486 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

BT click

Rating:

5

Author: MIKROE

Last Updated: 2020-11-26

Package Version: 1.0.0.0

mikroSDK Library: 1.0.0.0

Category: BT/BLE

Downloaded: 1906 times

Not followed.

License: MIT license  

BT Click is a compact add-on board targeted for applications that require both Bluetooth Smart and Classic connectivity.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "BT click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "BT click" changes.

Do you want to report abuse regarding "BT 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

BT click

BT click

Native view of the BT Click board.

View full image
BT click

BT click

Front and back view of the BT Click board.

View full image

Library Description

The library covers all the necessary functions to control BT Click board™. Library performs a standard UART interface communication.

Key functions:

  • void bt_send_data ( uint8_t *tx_data, uint8_t len ) - Send data function
  • uint16_t bt_get_data ( uint8_t *rx_data ) - Get response data function.
  • void bt_hw_reset ( void ) - HW reset function.

Examples description

The application is composed of three sections :

  • System Initialization - Initializes UART, sets AN, RST, CS and PWM pins as outputs and set INT pin as input and begins to write a log.
  • Application Initialization - Initialization driver enables - UART, enable uart interrupt routine, perform intro start the module, after that we configure the module: set local BT name ( BT Click ), set the Bluetooth Classic Class of Device ( COD ), set whether the device accepts new bondings, set Bluetooth Classic visibility and connectability and start a RFCOMM server as defined in the referenced SDP-entry.
  • Application Task - (code snippet) This example demonstrates the use of the BT Click board™. After module configuration, you can establish a Bluetooth Classic connection with a BT Click. If the click connection is successful, the blue LED turns on and communication is possible. Also, if the Bluetooth Classic connection is disconnected, the red LED turns on. The messages sent via a mobile phone are displayed on the Usart Terminal. Results are being sent to the Usart Terminal where you can track their changes.
void application_task ( )
{
    if ( bt_get_data_status( ) == BT_NEW_DATA_AVAILABLE )
    {
        rsp_data_num = bt_get_data( &rsp_data_buf[ 0 ] );

        if ( rsp_data_num != 0 )
        {
            len = rsp_data_buf[ 5 ];
            len += 5;

            if ( rsp_data_buf[ 2 ] == BT_NEW_EVT_RX_DISCONN_DATA )
            {
                display_evt_bt_conn_close( );

                display_evt_endpoint_data( );
            }
            
            if ( rsp_data_buf[ 2 ] == BT_NEW_EVT_CONNECTED )
            {
                display_evt_bt_conn_opened( );
            }
        }
    }
}

  • void intro_device_start ( ) - Start the module.
  • void display_response ( ) - Display response.
  • void display_evt_bt_conn_opened ( ) - Display event new connection was opened.
  • void display_evt_bt_conn_close ( ) - Display event new connection was closed.
  • void display_evt_endpoint_data ( ) - Display event endpoint data.

Other mikroE Libraries used in the example:

  • UART
  • Conversions

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

GNSS RTK click

0

GNSS RTK Click is a compact add-on board used to enhance the precision of position data derived from satellite-based positioning systems. This board features the ZED-F9P, a multi-band GNSS module with integrated multi-band Real Time Kinematics (RTK) technology offering centimeter-level accuracy from U-blox. This module concurrently uses GNSS signals from all four GNSS constellations (GPS, GLONASS, Galileo, and BeiDou), and provides multi-band RTK with fast convergence times, reliable performance, and easy integration. It also includes moving base support, allowing both base and rover to move while computing a centimeter-level accurate position between them.

[Learn More]

Cap Wheel 2 click

0

CAP Wheel 2 Click is a capacitive touch sensor with round-shaped electrodes integrated on a Click board™. This click can sense touch even through plastic, wood, or other dielectric materials, which can be used to protect the surface of the PCB and the sensor pad trace itself. Therefore, this Click board™ comes with overlay, made of plexiglass. Unlike the mechanical button, the capacitive touch button lasts much longer, it is not prone to damage and wear over time and it is very reliable. This Click board feature QS263B sensor which contains a ProxSense® module that uses patented technology to provide detection of proximity and touch conditions on numerous sensing lines.

[Learn More]

Led Flash 2 click

0

LED Flash 2 click is a powerful flash/torch click, featuring the MIC2870 from Microchip, a high-efficiency flash LED driver, optimized for driving one or two high-brightness camera flash LEDs.

[Learn More]