TOP Contributors

  1. MIKROE (2751 codes)
  2. Alcides Ramos (372 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (118 codes)
  5. Bugz Bensce (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 (139050 times)
  2. FAT32 Library (71588 times)
  3. Network Ethernet Library (56988 times)
  4. USB Device Library (47326 times)
  5. Network WiFi Library (43005 times)
  6. FT800 Library (42295 times)
  7. GSM click (29754 times)
  8. mikroSDK (27873 times)
  9. PID Library (26858 times)
  10. microSD click (26129 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: 2359 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

Gyro 4 click

5

Gyro 4 Click is a two-axis MEMS gyroscope for optical image stabilization applications. It is equipped with the L20G20IS, that includes a sensing element and an IC interface capable of providing the measured angular rate to the application through an SPI digital interface.

[Learn More]

EZO Carrier RTD Click

0

EZO Carrier Click - RTD is a compact add-on board engineered to provide temperature readings across a broad range of temperatures. This board features the EZO-RTD™, an embedded temperature circuit board from Atlas Scientific.

[Learn More]

AudioAmp 4 Click

0

AudioAmp 4 Click is a low-power audio amplifier with a digital volume control. It is equipped with the LM4860, an audio amplifier IC capable of delivering up to 1W of continuous power to an 8 Ω load.

[Learn More]