TOP Contributors

  1. MIKROE (2659 codes)
  2. Alcides Ramos (356 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 (136973 times)
  2. FAT32 Library (70086 times)
  3. Network Ethernet Library (56022 times)
  4. USB Device Library (46343 times)
  5. Network WiFi Library (41959 times)
  6. FT800 Library (41270 times)
  7. GSM click (29051 times)
  8. mikroSDK (26486 times)
  9. PID Library (26447 times)
  10. microSD click (25411 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 Audio 2 click

Rating:

5

Author: MIKROE

Last Updated: 2020-06-26

Package Version: 1.0.0.0

mikroSDK Library: 1.0.0.0

Category: BT/BLE

Downloaded: 1487 times

Not followed.

License: MIT license  

BT Audio 2 Click is Bluetooth audio stream add on board based on BM62 module from Microchip. It's a Stereo Audio module which is fully qualified Bluetooth v5.0 dual-mode (BDR/EDR/BLE) to be added in any wireless audio and voice application.

No Abuse Reported
Api supported

Do you want to subscribe in order to receive notifications regarding "BT Audio 2 click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "BT Audio 2 click" changes.

Do you want to report abuse regarding "BT Audio 2 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 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 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 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 Audio 2 Click

BT Audio 2 Click

Native view of the BT Audio 2 Click board.

View full image
BT Audio 2 Click

BT Audio 2 Click

Front and back view of the BT Audio 2 Click board.

View full image

Library Description

This library allows to establish a communication with the BT Audio 2 click (BM62 module). On this way we can perform a full control of the module, such as playing songs control, EQ control, Bluetooth connection control, status reading, etc. The response reading and checking are also supported by this library. For more details, please, check full documentation.

Key functions:

  • void btaudio2_response_handler_set( void ( *handler )( uint8_t*, uint16_t*, uint16_t* ) ); - This function sets handler on the function that should be performed.
  • btaudio2_err_t btaudio2_make_call( uint8_t data_base, unsigned char *phone_num ); - This command is used to trigger HF action for making an outgoing call.
  • btaudio2_err_t btaudio2_song_ctrl( uint8_t ctrl_byte ); - This command is used to perform the song control, such as the song volume, song selection, etc.

Examples description

The application is composed of three sections :

  • System Initialization - Initializes all necessary peripherals and pins.
  • Application Initialization - Initializes UART interface and performs the BTM device enabling, reset and mode configuration. Also sets a default callback function for the response checking.
  • Application Task - (code snippet) - Allows user to execute a full music control, such as volume control, song control, EQ control, BT power control. Note: By using driver functions user can perform the all other module functionality. Using the selected UART terminal user can check every command and event response.
void application_task( )
{
    uint8_t rx_dat = UART_Rdy_Ptr( );

    if ( rx_dat != RX_UART_NOT_READY )
    {
        rx_dat = UART_Rd_Ptr( );
    
        switch ( rx_dat )
        {
            case 'o' :
            {
                btaudio2_power_on_off( );
            break;
            }
            case 's' :
            {
                btaudio2_play_ctrl( BTAUDIO2_STOP );
                
                mikrobus_logWrite( ">> Command: ", _LOG_TEXT );
                log_response( );
            break;
            }
            case 'p' :
            {
                btaudio2_play_ctrl( BTAUDIO2_PLAY_PAUSE );
                
                mikrobus_logWrite( ">> Command: ", _LOG_TEXT );
                log_response( );
            break;
            }
            case '4' :
            {
                btaudio2_song_ctrl( BTAUDIO2_PREV_SONG );
                
                mikrobus_logWrite( ">> Command: ", _LOG_TEXT );
                log_response( );
            break;
            }
            case '6' :
            {
                btaudio2_song_ctrl( BTAUDIO2_NEXT_SONG );
                
                mikrobus_logWrite( ">> Command: ", _LOG_TEXT );
                log_response( );
            break;
            }
            case '+' :
            {
                btaudio2_song_ctrl( BTAUDIO2_VOLUME_UP );
                
                mikrobus_logWrite( ">> Command: ", _LOG_TEXT );
                log_response( );
            break;
            }
            case '-' :
            {
                btaudio2_song_ctrl( BTAUDIO2_VOLUME_DOWN );
                
                mikrobus_logWrite( ">> Command: ", _LOG_TEXT );
                log_response( );
            break;
            }
            case 'e' :
            {
                set_eq_mode( );
                
                mikrobus_logWrite( ">> Command: ", _LOG_TEXT );
                log_response( );
            break;
            }
            default :
            {
            break;
            }
        }
    }

    check_response_ready( );
}


Additional Functions :

  • collect_response - Collects a response sequence to the response buffer.
  • log_response - Sends the response to the determined uart terminal.
  • check_response_ready - Checks response ready flag and if the response is ready then calls the log_response function.
  • set_eq_mode - Performs the changing of 10 differents EQ modes of the BTM device. The uart rx interrupt will catch every byte which was sent to the uart rx buffer on the host mcu.

Other mikroE Libraries used in the example:

  • Conversions
  • C_String
  • UART

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

EERAM 3v3 click

5

Add memory to your project with EERAM 3.3V click. It carries the 47L16/47C16 I2C serial EERAM from Microchip. The click is designed to run on a 3.3V power supply. It communicates with the target microcontroller over I2C interface, with additional functionality provided by the INT pin on the mikroBUSâ„¢ line.

[Learn More]

Joystick 2 click

0

Joystick 2 Click is a smart navigation key concept based on SKRHABE010 by Alps, a 4-direction joystick switch with Center-push Function.

[Learn More]

Opto Encoder 4 click

0

Opto Encoder 4 Click is a compact add-on board that contains an optical sensor/encoder that can be used for movement or rotation encoding. This board features the EE-SX4330, a transmissive photo-microsensor from OMRON. It is intended to be used with an encoder disk or similar device that will act as a barrier between the emitter and detector of the sensor. Usually, it will be the disk with perforations, which is commonly used to detect the rotation speed.

[Learn More]