COM Port Communication
When connected via USB, turntable is represented as virtual COM port and use simple text protocol to communicate with PC. To test following commands manually software like PuTTY can be used.
Old turntables (before June 2018)
Command format | Description |
---|---|
#sN. | Set max speed to N |
#aN. | Set max acceleration to N |
#pN. | Move engine N ticks |
#e[1,0]. | Set engine state (1 - enabled, 0 - disabled) |
#i*. | Version number |
#nN. | StepsPerRound |
#r*. | Infinite rotation |
#c*. | Stop rotation |
#x[0,1]. | Set finity (similar to c if 0) |
#w[1,0]. | Set WiFi enabled |
#m*. | Return current steps |
#vN. | Set steps per notify |
New turntables (after June 2018)
For compatibility reasons, new turntables are using legacy protocol (described above) by default. To switch to new messages format, send command #l.
.
It is not recommended to use legacy format with new turntables. It is enabled to support Object2VR software and contains workarounds specific to this use case. New format is more structured, provides more functionality and easier to use.
PC-to-table commands
These commands are sent from pc to turntable. Turntable will send status message for every command received.
Format
#command:argument.
For commands without arguments they must be omitted:
#command.
Symbol | Contents |
---|---|
# | Command begin character |
command | Command string |
: | Delimiter |
argument | Command argument string |
. | Command end character |
Currently only integer arguments are used. For commands where argument is boolean, positive values are true
, negative or zero are false
.
List of commands
Command | Desctiption | Argument |
---|---|---|
GetVersionInfo | Returns version string | - |
GetStepsPerRound | Returns amount of steps needed to rotate 360 degrees | - |
GetMaxAllowedSpeed | Returns max speed in steps per second | - |
GetInitialSpeed | Returns speed at which turntable starts rotation | - |
GetCurrentSteps | Returns amount of steps rotated during rotation, 0 if turntable is not rotating at the moment | - |
GetIsRotating | Returns whether turntable is currently rotating | - |
GetIsCancellationRequested | Returns whether turntable is currently stopping rotation | - |
GetManualRotationModeEnabled | Returns whether turntable is in manual speed control mode | - |
SetSendNewLines | Set whether to send line breaks after messages (useful for readability) | Boolean |
SetInitialSpeed | Set starting rotation speed | Number (steps per second) |
SetTargetSpeed | Set target rotation speed | Number (steps per second) |
SetAcceleration | Set acceleration | Number (steps per second^2) |
SetEngineEnabled | Enable or disable engine lock | Boolean |
SetStepsPerNotify | Set steps interval at which rotation progress notification messages would be sent to PC | Number (steps count) |
SetManualRotationModeEnabled | Enable or disable manual rotation mode. Usual commands are disabled in this mode, rotation speed is not controlled by user. | Boolean |
SetSpeedManually | Set rotation speed in manual control mode | Number (steps per second) |
RotateSteps | Start rotation for desired amount of steps with the set speed and acceleration | Number (steps count) |
RotateInfinite | Start infinite rotation | Boolean (direction, 1 for CW, 0 for CCW) |
CancelRotation | Start braking | - |
GetAccumulatedStepsCount | Returns value of internal steps counter (since MFTv5). Might be useful to recover photo shooting process after software errors. | - |
ResetAccumulatedStepsCount | Reset value of internal steps counter (since MFTv5). | - |
ExecuteCustomEsp8266Command | Send arbitrary command to ESP8266. Argument should be valid AT command string. Note that the command string will be added to internal queue and this ExecuteCustomEsp8266 command itself will return success immediately. Wi-Fi only. | String (AT command) |
ExecuteCustomEsp8266CommandAppendNewLine | Same as ExecuteCustomEsp8266Command but also sends \r\n at the end of the command. Wi-Fi only. | String (AT command) |
SetCustomEsp8266CommandsDelay | Set minimal interval between executing custom ESP8266 commands. Also affect firmware startup time (how long will it wait for Wi-Fi to connect before restarting ESP8266). Wi-Fi only. | Number (milliseconds) |
Example:
#RotateSteps:10240.
#CancelRotation.
#RotateInfinite:1.
Table-to-PC messages
Format
[#command.message]
Symbol | Contents |
---|---|
#command. | Command of described previously format. |
[ | Message begin character |
message | Message string |
] | Message begin character |
Messages types
Commands status messages:
[#command:argument.Success]
[#command:argument.Processing]
[#command:argument.Cancelled]
[#command:argument.Fail]
Examples:
[#Rotate:120.Success]
[#CancelRotation.Processing]
[#Rotate:120.Cancelled]
Commands info messages
[#GetVersionInfo.MFTv1 SUPPORT_PHOTO_SHOOTING]
[#GetStepsPerRound.10240]
... (all commands with "Get" prefix)
Global info messages
The command part is empty in this messages (message does not belong to any particular command and can be sent at any time).
[#.CurrentSteps:100] - sent during rotation if steps per notify not set to zero
[Assertion failed at ...] - internal contract was violated, probably firmware bug
Versioning
Please refer to versioning page.