Example: Sensor configuration file for two USB cameras

Updated: April 19, 2023

This is a configuration file for two USB cameras connected to the board.

When you have more than one USB camera connected to the board, you must specify the bus and device fields in the address property. In addition, the bus field must be unique.

To determine the address information for the address parameter, use the usb -vvv command on the target. For example, after you run the usb -vvv, the Device Address and Upstream Host Controller values that are returned maps to the device and the bus fields for the address parameter, respectively.

For example, on your board, if SENSOR_UNIT_1 is connected to one port and SENSOR_UNIT_2 is connected to the other USB port, your sensor configuration file would look like this, where the Device Address was 1 and 2, and the Upstream Host Controller was 0 and 0:
begin SENSOR_UNIT_1
    type = usb_camera
    name = front
    position = 0, 0, 0
    direction = 0, 0, 1
    address = /dev/usb/io-usb-otg, 0, -1, -1, -1
    address = 0, 1, -1, -1
end SENSOR_UNIT_1

begin SENSOR_UNIT_2
    type = usb_camera
    name = rear
    position = 0, 0, 0
    direction = 0, 0, 1
    address = /dev/usb/io-usb-otg, 0, 2, -1, -1
end SENSOR_UNIT_2