This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function setUpLights() { | |
const lightingDevice = await navigator.usb.requestDevice({ filters: [] }); | |
await lightingDevice.open(); | |
await lightingDevice.claimInterface(0); | |
// This comes from https://github.com/NERDDISCO/webusb-dmx512-controller | |
lightingDevice.controlTransferOut({ | |
// It's a USB class request | |
requestType: "class", | |
// The destination of this request is the interface |