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 (137120 times)
  2. FAT32 Library (70240 times)
  3. Network Ethernet Library (56131 times)
  4. USB Device Library (46447 times)
  5. Network WiFi Library (42095 times)
  6. FT800 Library (41410 times)
  7. GSM click (29125 times)
  8. mikroSDK (26567 times)
  9. PID Library (26510 times)
  10. microSD click (25494 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: 1946 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

Smart Buck click

0

Smart Buck click is the two-channel step-down DC/DC converter and regulator, with plenty of additional functions. It can provide voltage measurement at each of its two programmable voltage outputs, as well as the measurement of the current consumption. In addition, it can also provide power consumption measurements of the Click board™ itself, both at the mikroBUS™ +5V power rail, and the external voltage input terminal. Finally, there is 2kbit of EEPROM at disposal, which can be used for logging the measurements, storage of the working parameters, or any other type of general purpose data.

[Learn More]

Load Cell 4 click

0

Load Cell 4 Click is a compact add-on board that contains a resistive sensor signal conditioner with a fast power-up data output response. This board features the ZSC31014, a CMOS integrated circuit for highly accurate amplification and analog-to-digital conversion of differential and half-bridge input signals from Renesas.

[Learn More]

WiFi NINA click

5

WiFi NINA click is a powerful standalone WiFi module, equipped with the state-of-the-art NINA-W132 module from u-blox, that can be easily configured with the u-blox s-center software, using AT commands.

[Learn More]