buzzer – buzzer control module
The actual name of the module can be buzz_wgen or buzz_nogen depending on the type of the buzzer installed.
It is not recommended to create an instance of this class manually. An instance has already been created in the [RFID Utils](#mod_rfid_utils) module. It can be imported with the following snippet:
try:
        from rfid_utils import BUZZ
except Exception:
        print('Sorry, no buzzer on this board')
Classes
- class buzzer.Buzzer(pin)
 pinis the number of the GPIO with the buzzer.- on()
 Switch the buzzer on. The
buzz_nogenmodule provides an optional parameterfreqwith the default value of 3200
- off()
 Switch the buzzer off.
- beeps(time_ms=50)
 Switch the buzzer on for the
time_msperiod (in milliseconds). This is not a coroutine (blocks fortime_msmilliseconds).
- beep(time_ms=50)
 - Async
 Switch the buzzer on for the
time_msperiod (in milliseconds). This is a coroutine.
- property enabled
 Returns
Trueif the buzzer is currently on,Falseif it is off.