Skip to content

Search the documentation

Kit
Firmware

Buzzer

Smart Home

The house’s buzzer; frequencies are in hertz and durations in milliseconds.

The Buzzer class is reached through this attribute of home.

Always there.

All the attributes of home are in its table.

Plays a tone of frequency hertz for duration milliseconds, and waits until it ends.

play_tone(frequency, duration)

Used in examples: Hello, house, Doorbell

Plays a note by name, "C3" to "B6" (for example "A4"), for duration milliseconds, and waits until it ends.

play_note(note, duration)

Used in examples: Hello, house, Web dashboard, Doorbell

Plays a list of (note, milliseconds) pairs in the background, for example [("C5", 100), ("E5", 200)]; returns at once.

play_notes(sequence)

Used in examples: Hello, house

Stops the notes playing in the background.

stop()

Used in examples: Hello, house

True while play_notes() is still playing.

is_playing() -> bool

Used in examples: Hello, house