RCServo Endpoint¶
Interface to servo entities on BrainStem modules.
Servo entities are built upon the digital input/output pins and therefore can also be inputs or outputs.
Please see the product datasheet on the configuration limitations.
See the RCServo Entity for generic information.
- PUT /api/v1/brainstem/(serial_num)/servo/(index)/enable¶
Enable the servo channel
See JSON Schema for Request Object and Response Object
- Parameters:
serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.
index – Index of entity to access. Default is 0.
- Request JSON Object:
value (boolean) –
Boolean value to set.
May be specified as a boolean, integer, or a string (formatted as “True”, “FALSE”, “1”, etc.)
- Response JSON Object:
response.value (boolean) – Value formatted as a boolean
response.rawValue (integer) – Unformatted value
- GET /api/v1/brainstem/(serial_num)/servo/(index)/enable¶
Get the enable status of the servo channel.
See JSON Schema for Response Object
- Parameters:
serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.
index – Index of entity to access. Default is 0.
- Response JSON Object:
response.value (boolean) – Value formatted as a boolean
response.rawValue (integer) – Unformatted value
- PUT /api/v1/brainstem/(serial_num)/servo/(index)/position¶
Set the position of the servo channel
See JSON Schema for Request Object and Response Object
- Parameters:
serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.
index – Index of entity to access. Default is 0.
- Request JSON Object:
value (integer) –
8-bit Integer value to set.
May be specified as an integer or a string (formatted as “123”, “0x12”, etc.)
- Response JSON Object:
response.value (integer) – Value formatted as an integer
response.rawValue (integer) – Unformatted value
- GET /api/v1/brainstem/(serial_num)/servo/(index)/position¶
Get the position of the servo channel
See JSON Schema for Response Object
- Parameters:
serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.
index – Index of entity to access. Default is 0.
- Response JSON Object:
response.value (integer) – Value formatted as an integer
response.rawValue (integer) – Unformatted value
- PUT /api/v1/brainstem/(serial_num)/servo/(index)/reverse¶
Set the output to be reversed on the servo channel
See JSON Schema for Request Object and Response Object
- Parameters:
serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.
index – Index of entity to access. Default is 0.
- Request JSON Object:
value (boolean) –
Boolean value to set.
May be specified as a boolean, integer, or a string (formatted as “True”, “FALSE”, “1”, etc.)
- Response JSON Object:
response.value (boolean) – Value formatted as a boolean
response.rawValue (integer) – Unformatted value
- GET /api/v1/brainstem/(serial_num)/servo/(index)/reverse¶
Get the reverse status of the servo channel
See JSON Schema for Response Object
- Parameters:
serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.
index – Index of entity to access. Default is 0.
- Response JSON Object:
response.value (boolean) – Value formatted as a boolean
response.rawValue (integer) – Unformatted value