This is the description of the Modbus protocol for the Piezo Buzzer Bricklet. General information and technical specifications for the Piezo Buzzer Bricklet are summarized in its hardware description.
A general description of the Modbus protocol structure can be found here.
BrickletPiezoBuzzer.
beep
¶Function ID: |
|
---|---|
Request: |
|
Response: |
|
Beeps for the given duration.
BrickletPiezoBuzzer.
morse_code
¶Function ID: |
|
---|---|
Request: |
|
Response: |
|
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".
BrickletPiezoBuzzer.
get_identity
¶Function ID: |
|
---|---|
Request: |
|
Response: |
|
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 Isolator Bricklet is always at position 'z'.
The device identifier numbers can be found here.
BrickletPiezoBuzzer.
CALLBACK_BEEP_FINISHED
¶Function ID: |
|
---|---|
Response: |
|
This callback is triggered if a beep set by beep
is finished
BrickletPiezoBuzzer.
CALLBACK_MORSE_CODE_FINISHED
¶Function ID: |
|
---|---|
Response: |
|
This callback is triggered if the playback of the morse code set by
morse_code
is finished.