Programming with KittenBlock: Buzzer

Buzzers can make your creations more interesting by adding sounds and musics.

../../_images/kbbanner.png

Buzzer Blocks

../../_images/buzzer_en.png

Sample Program: Buzzer and Frequencies

The buzzer can be controlled using frequencies.

Refer to this page for more information about frequencies and notes: https://pages.mtu.edu/~suits/notefreqs.html

../../_images/buzzer_code1en.png

Sample Program: Stopping the Buzzer

Press A and the buzzer will sound continuously, press B to stop the sound.

../../_images/buzzer_code2en.png

Sample Program: Playing Notes

Plays the 8 stand notes.

../../_images/buzzer_code3en.png

Sample Program: Making your own Melodies

  • Using c4:2 as an example

    • C is the note played

    • 4 is the octave

    • :2 is the duration in beats

../../_images/buzzer_code4en.png

Sample Program: Playing Preset Melodies

Plays a few preset melodies.

../../_images/buzzer_code5en.png

Sample Program: Affecting the BPM

The BPM slowly increases.

../../_images/buzzer_code6en.png