buzz 2.0.0.0
|
BUZZ Click is an accessory board in mikroBus™ form factor. Board features a piezo speaker capable of emitting audio signals.Buzzer’s resonant frequency is 3.8kHz (where you can expect it’s best performance).
We provide a library for the BUZZ 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 BUZZ Click driver.
buzz_cfg_setup
Config Object Initialization function. buzz_init
Initialization function. buzz_default_cfg
Click Default Configuration function. buzz_set_duty_cycle
This function sets the PWM duty cycle in percentages ( Range[ 0..1 ]). buzz_pwm_stop
This function stops the PWM moudle output. buzz_pwm_start
This function starts the PWM moudle output. buzz_play_sound
This function plays sound on buzzer. This example demonstrates the use of Buzz click boards.
The demo application is composed of two sections :
Initializes the driver and logger.
Plays the Imperial March melody. Also logs an appropriate message on the USB UART.
The minimal PWM Clock frequency required for this example is the frequency of tone C6 - 1047 Hz. So, in order to run this example and play all tones correctly, the user will need to decrease the MCU's main clock frequency in MCU Settings for the certain architectures in order to get the required PWM clock frequency.
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.