This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
projects:crazyflie2:expansionboards:buzzer [2016-03-05 22:43] chad [Changing the sounds] Add "modules" to the path for the sounds file. |
projects:crazyflie2:expansionboards:buzzer [2021-06-24 16:09] (current) kimberly |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | <WRAP center round important 60%> | ||
| + | This page has deprecated and moved to the new documentation framework of the main Bitcraze website. Please go to [[https:// | ||
| + | </ | ||
| ====== Buzzer expansion deck ====== | ====== Buzzer expansion deck ====== | ||
| - | The buzzer deck contains a low profile piezo buzzer and have a 1-wire memory which enables the Crazyflie to automatically detect the deck. | + | The buzzer deck contains a low profile piezo buzzer and has a 1-wire memory which enables the Crazyflie to automatically detect the deck. |
| The deck is designed to be installed either on the top or the bottom of the Crazyflie. | The deck is designed to be installed either on the top or the bottom of the Crazyflie. | ||
| Line 10: | Line 13: | ||
| * Based on the CMT-1203-SMT | * Based on the CMT-1203-SMT | ||
| * 1-wire memory for automatic expansion board detection | * 1-wire memory for automatic expansion board detection | ||
| - | * Designed for mounting over or under the Crazyflie | + | * Designed for mounting over or under the Crazyflie |
| * Mechanical specification: | * Mechanical specification: | ||
| * Weight: 1.8g | * Weight: 1.8g | ||
| Line 21: | Line 24: | ||
| ===== Changing the sounds ===== | ===== Changing the sounds ===== | ||
| - | Changing the sounds requires modifications to the firmware. The code for the sounds is located in modules/ | + | Changing the sounds requires modifications to the firmware. The code for the sounds is located in [[https:// |
| A sequences is defined in the .notes member of the Melody struct. The notes are defined as tuples of a note (pitch) and duration. A sequence must be ended with the end marker. | A sequences is defined in the .notes member of the Melody struct. The notes are defined as tuples of a note (pitch) and duration. A sequence must be ended with the end marker. | ||
| Line 27: | Line 30: | ||
| The effects are defined in the effects array. Each entry takes a function to call and related parameters. | The effects are defined in the effects array. Each entry takes a function to call and related parameters. | ||
| To add a new melody, use the melodyplayer function for the .call member and assign your Melody struct to the .melody member. | To add a new melody, use the melodyplayer function for the .call member and assign your Melody struct to the .melody member. | ||
| + | |||
| + | ===== Parameters ===== | ||
| + | |||
| + | ^Name^Type^Access^Value (default)^Description^ | ||
| + | |sound.effect|uint8_t|RW|0|Sound effect (0=Off, 1=Factory test, 2=USB connected, 3=USB disconnected, | ||
| + | |sound.freq|uint16_t|RW|4000| | | ||
| + | |sound.neffect|uint32_t|RO|13|Number of available sound effects| | ||
| + | |sound.ratio|uint8_t|RW|0| | | ||