BLE 8 Click Board
BLE 8 Click Board
The BLE 8 Click Board™ is a fully embedded stand-alone Bluetooth 5.0 Energy connectivity module, equipped with the ANNA-B112, an ultra-small, high-performing, standalone Bluetooth low energy module for easy integration of Bluetooth low energy connectivity (BLE) into various electronic devices.
This module combines a high-performance ARM® Cortex®-M4 CPU microprocessor with Floating Point Unit (FPU) and state-of-the-art power performance. Reliable and easy to use, BLE 8 Click Board™ is a perfect solution for the development of various IoT applications, smart home applications, BLE enabled toys, advanced robotics, and other similar applications.
Software Support
We provide a library for the BLE 8 Click Board™ on our LibStock page, as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Library Description
This library allows user to perform a full control of the ANNA-B112 module. With this library user can send a commands to the module to perform the desired module configurations, connection with the other device, data transferring, and also can check the response from the module. User also can check the all necessary information about module. This library consists of the some predefined commands witch can be helpful to user to configure the module. For more details check full documentation.
Key Functions
void ble8_uartDriverInit( T_BLE8_P gpioObj, T_BLE8_P uartObj )
- This function initializes UART driver.void ble8_response_handler_set( void ( *handler )( uint8_t* ) )
- This function sets handler on the function which should be performed, for example function for the results logging.void ble8_uart_isr( void )
- This function reads response bytes from the module and sets flag after each received byte.void ble8_send( uint8_t *tx_data, uint8_t term_char )
- This function allows user to transmit data and send commands to the module.
Example Description
The application is composed of three sections :
- System Initialization - Initializes peripherals and pins.
- Application Initialization - Initializes UART serial interface, UART interrupt, and executes a module reset. Allows user to enter command mode.
- Application Task - (code snippet) - This function has two segments. First segment allows user to enter a commands, module configuration, data which will be transmitted, also to check all module and connection status by using the serial terminal. Press 'Enter' when you want to send the entered command (data). Press 'Backspace' to delete the wrong entered character before you send the command. Press 'Up-Down' or 'Left-Right' to see and enter a 3 last sent commands. Press 'Esc' and then 'r' or 'R' to execute a module reset. Press 'Esc' and then 't' or 'T' to enter command mode. Second segment allows user to check and get response from the ANNA-B112 module when response was ready. Note : The all possible commands, module configuration and specification can be found in the related documents: [1] ANNA-B112 System Integration Manual, document number UBX-18009821 [2] u-blox Short Range AT Commands Manual, document number UBX-14044127 [3] ANNA-B112 Getting Started Guide, document number UBX-18020387 [4] ANNA-B112 Declaration of Conformity, document number UBX-18058993.
void applicationTask() { rx_data = UART_Rdy_Ptr(); if (rx_data != _RX_NOT_READY) { rx_data = UART_Rd_Ptr(); checkRX(); } if (start_timer == 1) { timer_cnt++; } logRsp(); Delay_us( 1 ); }
Additional Functions :
- _strcpy - Allows user to copy content of one string to another string, starting from the first place.
- _strncmp - Allows user to compare a content of two strings.
- prevCmd - Checks which character (Up, Down, Left, Right, Esc) was entered by the user.
- checkPrevCmd - Determines which of 3 previous commands will be entered again.
- addCmdLine - Adds new command line for entering new data/command.
- enterLocalAddr - Allows user to enter a 12 digits of target local address in hex format from the serial terminal.
- cmdCmp - Checks did user enter one of the predefined commands, that are defined for this demo example.
- checkRX - Allows user to enter a desired characters and to send the commands from the serial terminal.
- getRsp - Catches the response bytes and sets flag when the response was ready.
- logRsp - Allows user to see and check the response on the serial terminal.
- interrupt - Calls a uart isr function when new byte was received from the module.
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
- UART
Additional Notes and Information
Depending on the development board you are using, you may need a USB UART Click Board™, USB UART 2 Click Board™ or RS232 Click Board™ 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.
MikroSDK
The BLE 8 Click Board™ is supported with mikroSDK - MikroElektronika Software Development Kit. To ensure proper operation of mikroSDK compliant Click Board™ demo applications, mikroSDK should be downloaded from the LibStock and installed for the compiler you are using.
BLE 8 Click Board
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.