buzzer — buzzer driver

The buzzer module is used to control the amplitude and frequency of a buzzer onboard your OpenMV Cam.

Note

The buzzer (and this module) is not present on all OpenMV Cam models.

Functions

buzzer.freq(freq)

Sets the buzzer frequency independently of the volume.

freq any frequency to drive the buzzer at.

buzzer.duty(duty)

Sets the buzzer duty cycle independently of the frequency.

duty any PWM duty cycle percentage (0-255 for 0-100%).

Constants

buzzer.RESONANT_FREQ

Constant definting the highest volume frequency of the buzzer (typically 4000 Hz).