User Tools

Site Tools


projects:crazyflie2:expansionboards:buzzer

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

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 {{:projects:crazyflie2:expansionboards:buzzer-revc.pdf|schematic}}. Buzzer expansion deck {{:projects:crazyflie2:expansionboards:buzzer-revc.pdf|schematic}}.
  
 +===== Changing the sounds =====
 +
 +Changing the sounds requires modifications to the firmware. The code for the sounds is located in modules/src/sound_cf2.c. 
 +
 +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.
projects/crazyflie2/expansionboards/buzzer.txt · Last modified: 2021-06-24 16:09 by kimberly