Skip to content

viam-modules/dimensionengineering

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This dimensionengineering module implements a dimensionengineering sabertooth motor using the rdk:component:motor API.

Configure your sabertooth motor

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>
}

Attributes

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:
  • On Linux, run ls /dev/serial/by-path/* to show connected serial devices, or look for your device in the output of sudo dmesg | grep tty. Example: "/dev/serial/by-path/usb-0:1.1:1.0".
  • On macOS, run ls /dev/tty* | grep -i usb to show connected USB serial devices, ls /dev/tty* to browse all devices, or look for your device in the output of sudo dmesg | grep tty. Example: "/dev/ttyS0".
address int Required Serial address of the controller.
motor_channel int Required Channel the motor is connected to on the controller.

Example configuration

viam:dimensionengineering:sabertooth

  {
      "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": []
  }

Next Steps

  • 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.