NAME

Tinkerforge::BrickletPiezoBuzzer - Creates 1kHz beep

CONSTANTS

DEVICE_IDENTIFIER

This constant is used to identify a Piezo Buzzer Bricklet.

The get_identity() subroutine and the CALLBACK_ENUMERATE callback of the IP Connection have a device_identifier parameter to specify the Brick's or Bricklet's type.

DEVICE_DISPLAY_NAME

This constant represents the display name of a Piezo Buzzer Bricklet.

CALLBACK_BEEP_FINISHED

This constant is used with the register_callback() subroutine to specify the CALLBACK_BEEP_FINISHED callback.

CALLBACK_MORSE_CODE_FINISHED

This constant is used with the register_callback() subroutine to specify the CALLBACK_MORSE_CODE_FINISHED callback.

FUNCTION_BEEP

This constant is used with the get_response_expected(), set_response_expected() and set_response_expected_all() subroutines.

FUNCTION_MORSE_CODE

This constant is used with the get_response_expected(), set_response_expected() and set_response_expected_all() subroutines.

FUNCTION_GET_IDENTITY

This constant is used with the get_response_expected(), set_response_expected() and set_response_expected_all() subroutines.

FUNCTIONS

new()

Creates an object with the unique device ID *uid* and adds it to the IP Connection *ipcon*.

beep()

Beeps for the given duration.

morse_code()

Sets morse code that will be played by the piezo buzzer. The morse code is given as a string consisting of "." (dot), "-" (minus) and " " (space) for *dits*, *dahs* and *pauses*. Every other character is ignored.

For example: If you set the string "...---...", the piezo buzzer will beep nine times with the durations "short short short long long long short short short".

get_identity()

Returns the UID, the UID where the Bricklet is connected to, the position, the hardware and firmware version as well as the device identifier.

The position can be 'a', 'b', 'c', 'd', 'e', 'f', 'g' or 'h' (Bricklet Port). A Bricklet connected to an :ref:`Isolator Bricklet <isolator_bricklet>` is always at position 'z'.

The device identifier numbers can be found :ref:`here <device_identifier>`. |device_identifier_constant|