This dimensionengineering module implements a dimensionengineering sabertooth motor using the rdk:component:motor
API.
Note
Before configuring your motor, you must create a machine.
Navigate to the CONFIGURE tab of your machine in the Viam app. Add motor / dimensionengineering:sabertooth to your machine.
On the new component panel, copy and paste the following attribute template into your motor's attributes field:
{
"serial_path": "<serial-path-to-your-motor>",
"serial_address": <int>,
"motor_channel": <int>
}
The following attributes are available for viam:dimensionengineering:sabertooth
motors:
Attribute | Type | Required? | Description |
---|---|---|---|
serial_path |
string | Required | The full filesystem path to the serial device, starting with /dev/. To find your serial device path, first connect the serial device to your machine, then:
|
address |
int | Required | Serial address of the controller. |
motor_channel |
int | Required | Channel the motor is connected to on the controller. |
{
"name": "<your-dimensionengineering-sabertooth-motor-name>",
"model": "viam:dimensionengineering:sabertooth",
"type": "motor",
"namespace": "rdk",
"attributes": {
"serial_path": "/dev/serial/by-path/your_device",
"serial_address": 127,
"motor_channel": 1
},
"depends_on": []
}
- To test your motor, expand the TEST section of its configuration pane or go to the CONTROL tab.
- To write code against your motor, use one of the available SDKs.
- To view examples using a motor component, explore these tutorials.