pi_weather.core.io.buzzer module

Module to define general behavior for a given buzzer

class pi_weather.core.io.buzzer.ActiveBuzzer(pin)[source]

Bases: object

Class to manage an active buzzer

Parameters:

pin (int)

__init__(pin)[source]

C-tor function to define an active buzzer :param pin: PIN of the buzzer :type pin: int

Parameters:

pin (int)

Return type:

None

setup_buzzer()[source]

Function to set up the active buzzer object :return: Nothing

Return type:

None

turn_on()[source]

Function to turn on the buzzer :return: Nothing

Return type:

None

turn_off()[source]

Function to turn off the buzzer :return: Nothing

Return type:

None

beep(duration=0.5)[source]

Function to make the buzzer beep :param duration: Duration of the beep (in seconds) :type duration: float :return: Nothing

Return type:

None

Parameters:

duration (float)

close()[source]

Function to close the buzzer :return: Nothing

Return type:

None

__del__()[source]

D-tor function :return: Nothing

Return type:

None