Buzzer¶
Buzzer module.
-
class
devices.buzzer.buzzer.Buzzer(pin: int)¶ Bases:
objectClass for interaction with buzzer.
-
play(tone: int, sleep_time: int) → None¶ Play sound on buzzer.
-
play_melody(tones: list, rhythm: list, tempo: int)¶ Play melody on buzzer.
param tones: list of frequenc/es. param rhythm: list of rythm note deviders (if 1/16 devider is 16 etc) param tempo: lengh of whole note (ms)
-
-
devices.buzzer.buzzer.play(buzzer: <sphinx.ext.autodoc.importer._MockObject object at 0x7f20796241d0>, tone: int, sleep_time: int) → None¶ Play sound on PWM pin.