> For the complete documentation index, see [llms.txt](https://sharinghub-eng.kittenbot.hk/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sharinghub-eng.kittenbot.hk/main-controllers/futureboard/futureboard-kittenblock-programming-tutorial/programming-with-kittenblock-buzzer.md).

# Programming with KittenBlock: Buzzer

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

![](https://kittenbothk-eng.readthedocs.io/en/latest/_images/kbbanner.png)

### Buzzer Blocks

![](https://kittenbothk-eng.readthedocs.io/en/latest/_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>

![](https://kittenbothk-eng.readthedocs.io/en/latest/_images/buzzer_code1en.png)

#### Sample Program: Stopping the Buzzer

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

![](https://kittenbothk-eng.readthedocs.io/en/latest/_images/buzzer_code2en.png)

#### Sample Program: Playing Notes

Plays the 8 stand notes.

![](https://kittenbothk-eng.readthedocs.io/en/latest/_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

![](https://kittenbothk-eng.readthedocs.io/en/latest/_images/buzzer_code4en.png)

#### Sample Program: Playing Preset Melodies

Plays a few preset melodies.

![](https://kittenbothk-eng.readthedocs.io/en/latest/_images/buzzer_code5en.png)

#### Sample Program: Affecting the BPM

The BPM slowly increases.

![](https://kittenbothk-eng.readthedocs.io/en/latest/_images/buzzer_code6en.png)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://sharinghub-eng.kittenbot.hk/main-controllers/futureboard/futureboard-kittenblock-programming-tutorial/programming-with-kittenblock-buzzer.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
