TOP Contributors

  1. MIKROE (2658 codes)
  2. Alcides Ramos (355 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 (136935 times)
  2. FAT32 Library (70055 times)
  3. Network Ethernet Library (56013 times)
  4. USB Device Library (46328 times)
  5. Network WiFi Library (41936 times)
  6. FT800 Library (41259 times)
  7. GSM click (29046 times)
  8. mikroSDK (26453 times)
  9. PID Library (26435 times)
  10. microSD click (25391 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: 1896 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

Angle 6 click

0

Angle 6 Click is a compact add-on board that detects the absolute angular position of a permanent magnet, typically a diametrically magnetized cylinder on a rotating shaft. This board features the MAQ470GQE, a 12-bit contactless angle sensor with PWM output from Monolithic Power Systems. It supports a wide range of magnetic field strengths and spatial configurations, with both end-of-shaft and off-axis (side-shaft mounting), supported configurations. Fast data acquisition and processing provides accurate angle measurement at speeds from 0 to 60,000 rpm, alongside magnetic field strength detection with programmable thresholds.

[Learn More]

Force 5 click

5

Force 5 Click is a compact add-on board that contains a stable and flexible compensated/amplified micro force sensor.

[Learn More]

AudioMUX click

5

AudioMUX click is a sound processing Click board with digital controls, based on the TDA7468D IC.

[Learn More]