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 (137089 times)
  2. FAT32 Library (70232 times)
  3. Network Ethernet Library (56098 times)
  4. USB Device Library (46434 times)
  5. Network WiFi Library (42053 times)
  6. FT800 Library (41383 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

OLED W click

5

OLED W click carries a 96 x 39px blue monochrome passive matrix OLED display. The display is bright, has a wide viewing angle and low power consumption. To drive the display, OLED B click features an SSD1306 controller.

[Learn More]

Bargraph 2 click

0

BarGraph 2 click is a 10-segment bar graph display click, which uses a high-quality, multicolor bar graph LED display. The bar graph display is a very popular device for displaying various properties, whether it be an audio level, current/voltage level, position of the encoder, and generally any property that can be displayed in a form of a bar graph.

[Learn More]

2x2 key click

0

2x2 Key click has a 4 button keypad and allows multiple key presses.

[Learn More]