DeviceMessages
Device Messages
All devices:
Get Version
Request message: | 0 |
Additional parameters: | None |
Reply: | 1 byte: Minor version 1 byte: Major version |
This is a mandatory message that must be supported by all devices. It returns the version number as two bytes; the minor and major version numbers.
Motor devices (suggestions only):
The following are the messages currently implemented on the sample DC and stepper motor drivers.
Forward
Request message: | 1 |
Parameters: | 1 byte: speed (0-255) |
Reply: | None |
Reverse
Request message: | 2 |
Parameters: | 1 byte: speed (0-255) |
Reply: | None |
Set position counter
Request message: | 3 |
Parameters: | 2 bytes: big-endian integer representing the motor position |
Reply: | None |
Get position counter
Request message: | 4 |
Parameters: | None |
Reply: | 2 bytes: big-endian integer representing the motor position |
Seek to position
Request message: | 5 |
Parameters: | 1 byte: speed \ |
Reply: | None |
Release torque
Request message: | 6 |
Parameters: | None |
Reply: | None |
This differs from setting the speed to 0 in some cases (such as a stepper motor) because not only does it stop, but it sets the motor into a power-off mode where it won't hold its position and it can free-spin.
All other messages are currently unallocated. Please record them here as you define any.