Links

Buzzer

Python Library for Buzzer.

Python Library

Turta_Buzzer library is responsible for generating basic sounds.

Initialization

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.

Basic Members

Start

Generates sound.
start(freq)
  • Parameters
    • Int freq: Frequency. (1000 to 10000, default is 5000.)
  • Returns
    • None

Stop

Stops generating sound.
stop()
  • Parameters
    • None
  • Returns
    • None

Beep

Plays a 'be beep' tone.
beep()
  • Parameters
    • None
  • Returns
    • None

Finalizer

When exiting from the program, the library releases the GPIO pin.