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 (137101 times)
  2. FAT32 Library (70236 times)
  3. Network Ethernet Library (56126 times)
  4. USB Device Library (46434 times)
  5. Network WiFi Library (42077 times)
  6. FT800 Library (41388 times)
  7. GSM click (29116 times)
  8. mikroSDK (26562 times)
  9. PID Library (26497 times)
  10. microSD click (25487 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

RS485 5V click

0

RS485 click 5V is an RS422/485 transceiver Click board™, which can be used as an interface between the TTL level UART and the RS422/485 communication bus. It features a half-duplex communication capability, bus Idle, open, and short-circuit detection, thermal shutdown, and more. It is well suited for transmitting data packets over long distances and noisy areas, using the twisted wire bus, which offers good electromagnetic interferences (EMI) immunity.

[Learn More]

MikroPlot Data Visualization Tool

5

MikroPlot is a graph generator. It’s a simple tool to help you visualize sensor data recorded over time. It’s suitable for bio signals (ECG, EEG, EMG) as well as environmental data logging (temperature, humidity etc). The app can receive data sets directly from a microcontroller through a UART-USB connection.

[Learn More]

Temp-Hum 10 click

5

Temp-Hum 10 Click is a smart temperature and humidity sensing Click board, aimed towards IoT applications, due to its extremely small size and very low power consumption.

[Learn More]