Server to acces the Wombat's motors / servos / etc.
The base request must contain the key type, which can either have the value get or set:
{
"type": "get|set",
...
}When requesting a get, the message must contain the request key, which
can have following values:
-
motor
additionally required:port: int (0...3)
returns
success: boolvalue: int (-1500...1500)
-
servo_pos
additionally required:port: int (0...3)
returns
success: boolvalue: int (0...2047)
-
servo_enabled
additionally required:port: int (0...3)
returns
success: boolvalue: bool
-
digital
additionally required:port: int (0...9)
returns
success: boolvalue: bool
-
analog
additionally required:port: int (0...4)
returns
success: boolvalue: int (0...4086)
request:
{
"type": "get",
"request": "analog",
"port": 0
}return:
{
"success": true,
"value": 1834
}When requesting a set, the message must contain the request key, which
can have following values:
-
motor
additionally required:port: int (0...3)velocity: int (-1500...1500)
returns
success: bool
-
servo_pos
additionally required:port: int (0...3)position: int (0...2047)
returns
success: bool
-
servo_enabled
additionally required:port: int (0...3)enabled: bool
returns
success: bool
request:
{
"type": "set",
"request": "motor",
"port": 0,
"velocity": 1300
}return:
{
"success": true
}