Comment on page
Buzzer
Python Library for Buzzer.
Turta_Buzzer library is responsible for generating basic sounds.
Add the following statement to the top of your Python code.
from turta_iothat3 import Turta_Buzzer
Then, create an instance of the BuzzerDriver class.
buzzer = Turta_Buzzer.BuzzerDriver()
Now you're ready to access the library by calling its instance.
Generates sound.
start(freq)
Parameters
Int freq: Frequency. (1000 to 10000, default is 5000.) Returns
None
Stops generating sound.
stop()
Parameters
None Returns
None
Plays a 'be beep' tone.
beep()
Parameters
None Returns
None
When exiting from the program, the library releases the GPIO pin.
Last modified 4yr ago