makenai / node-uvc-control

Control UVC compliant USB webcams from node
80 stars 28 forks source link

added support for multiple devices #8

Closed redFrik closed 7 years ago

redFrik commented 7 years ago

using options deviceAddress. useful for when connecting multiple webcams of the same type - e.g. two c920

var UVCControl= require('uvc-control');
var camera1= new UVCControl(0x046d, 0x082d, {deviceAddress: 0x9});
camera1.set('saturation', 0);
var camera2= new UVCControl(0x046d, 0x082d, {deviceAddress: 0xa});
camera2.set('saturation', 0);

look up the deviceAddress using

var usb = require('usb');
console.log(usb.getDeviceList());

or with IORegistryExplorer.app or similar.

positlabs commented 7 years ago

This will be part of #15

positlabs commented 7 years ago

@redFrik, thanks for the submission. I've included it in #15, which adds a few more options.