bt 2.0.0.0
|
BT Click is a compact add-on board targeted for applications that require both Bluetooth Smart and Classic connectivity. This board features the BT121, a dual-mode Bluetooth Smart Ready module solution that gives unparalleled flexibility to integrate both Bluetooth Smart and Bluetooth Basic Rate/Enhanced Data Rate (BR/EDR) wireless technologies from Silicon Labs.
We provide a library for the BT Click as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Package can be downloaded/installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.
This library contains API for BT Click driver.
bt_cfg_setup
Config Object Initialization function. bt_init
Initialization function. bt_default_cfg
Click Default Configuration function. bt_set_local_name
This function sets the local name of the device. bt_send_package
This function sends a data package to the click board. bt_read_package
This function waits for the command or event type of message to arrive and then reads the complete message and stores it to pkg structure. This example demonstrates the use of BT click board.
The demo application is composed of two sections :
Initializes the driver and configures the click board.
Handles most of the events required for this example, the packages of events not supported in this example will be just displayed on the USB UART. The event handler will display all messages sent from the remote device on the USB UART and send back the predefined response message "DONE". There are two specific commands which can be sent from the remote device: "led blink" - calls bt_led_blink function for a 5 seconds time period. "check buttons" - calls bt_check_buttons function.
We have used the Serial Bluetooth Terminal smartphone application for the test. A smartphone and the click board must be paired in order to exchange messages with each other.
The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.
Other Mikroe Libraries used in the example:
Additional notes and informations
Depending on the development board you are using, you may need USB UART click, USB UART 2 Click or RS232 Click to connect to your PC, for development systems with no UART to USB interface available on the board. UART terminal is available in all MikroElektronika compilers.