This shows you the differences between two versions of the page.
Next revision | Previous revision Next revision Both sides next revision | ||
projects:crazyflie2:expansionboards:buzzer [2016-02-04 16:13] kristoffer created |
projects:crazyflie2:expansionboards:buzzer [2016-03-05 22:43] chad [Changing the sounds] Add "modules" to the path for the sounds file. |
||
---|---|---|---|
Line 19: | Line 19: | ||
Buzzer expansion deck {{: | Buzzer expansion deck {{: | ||
+ | ===== Changing the sounds ===== | ||
+ | |||
+ | Changing the sounds requires modifications to the firmware. The code for the sounds is located in modules/ | ||
+ | |||
+ | 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. | ||
+ | |||
+ | 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. |