Skip to content

Instantly share code, notes, and snippets.

View dinther's full-sized avatar

Paul van Dinther dinther

  • Dinther Product Design
  • Auckland, New Zealand
  • 02:18 (UTC +12:00)
View GitHub Profile
@alexanderson1993
alexanderson1993 / lighting.js
Created December 13, 2019 02:37
Sending DMX messages to an ENTTEC Pro USB controller over WebUSB
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