This wit-motion module implements a WitMotion imu movement sensor, including the HWT905-TTL IMU model using the rdk:component:movement_sensor
API.
The imu-wit
movement sensor model supports the following IMUs manufactured by :
- BWT61CL
- BWT901CL
- HWT901B-TTL
The imu-wit-hwt905
movement sensor model supports the HWT905-TTL IMU manufactured by WitMotion.
Other WitMotion IMUs that communicate over serial may also work with this model but have not been tested.
Note
Before configuring your movement_sensor, you must create a machine.
Navigate to the CONFIGURE tab of your machine in the Viam app. Add movement_sensor / wit-motion:imu-wit to your machine.
On the new component panel, copy and paste the following attribute template into your movement_sensor's attributes field:
{
"serial_path": "<your-port>",
"serial_baud_rate": <int>
}
The following attributes are available for viam:wit-motion:imu-wit
movement_sensors:
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:
|
serial_baud_rate |
int | Optional | The rate at which data is sent from the sensor over the serial connection. Valid rates are 9600 and 115200 . The default rate will work for all models. Only the HWT901B can have a different serial baud rate. Refer to your model's data sheet. Default: 115200 |
{
"name": "<your-wit-motion-imu-wit-movementsensor-name>",
"model": "viam:wit-motion:imu-wit",
"type": "movement_sensor",
"namespace": "rdk",
"attributes": {
"serial_path": "/dev/serial/by-path/usb-0:1.1:1.0",
"serial_baud_rate": 115200
},
"depends_on": []
}
{
"name": "<your-wit-motion-imu-wit-hwt905-movementsensor-name>",
"model": "viam:wit-motion:imu-wit-hwt905",
"type": "movement_sensor",
"namespace": "rdk",
"attributes": {
"serial_path": "/dev/serial/by-path/usb-0:1.1:1.0",
"serial_baud_rate": 115200
},
"depends_on": []
}
- To test your movement_sensor, expand the TEST section of its configuration pane or go to the CONTROL tab.
- To write code against your movement_sensor, use one of the available SDKs.
- To view examples using a movement_sensor component, explore these tutorials.