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.
Function ID: | 1 |
---|---|
Request: |
|
Response: | no response |
Beeps with the duration in ms. For example: If you set a value of 1000, the piezo buzzer will beep for one second.
Function ID: | 2 |
---|---|
Request: |
|
Response: | no 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".
The maximum string size is 60.
Function ID: | 255 |
---|---|
Request: | empty payload |
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' or 'd'.
The device identifier numbers can be found here.
Function ID: | 3 |
---|---|
Response: | empty payload |
This callback is triggered if a beep set by beep is finished
Function ID: | 4 |
---|---|
Response: | empty payload |
This callback is triggered if the playback of the morse code set by morse_code is finished.