This is the description of the Modbus protocol for the Tilt Bricklet. General information and technical specifications for the Tilt Bricklet are summarized in its hardware description.
A general description of the Modbus protocol structure can be found here.
Function ID: | 1 |
---|---|
Request: | empty payload |
Response: |
|
Returns the current tilt state. The state can either be
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: | 2 |
---|---|
Request: | empty payload |
Response: | no response |
Enables the CALLBACK_TILT_STATE callback.
Function ID: | 3 |
---|---|
Request: | empty payload |
Response: | no response |
Disables the CALLBACK_TILT_STATE callback.
Function ID: | 4 |
---|---|
Request: | empty payload |
Response: |
|
Returns true if the CALLBACK_TILT_STATE callback is enabled.
Function ID: | 5 |
---|---|
Response: |
|
This callback provides the current tilt state. It is called every time the state changes.
See get_tilt_state for a description of the states.