Closed gqbgqb closed 6 years ago
Looks like you have missed out an async
on your execution block in the then() function.
I recommend you don't mix promises with async/await. To only use async/await, omit the then()
e.g. something like:
let selectedDevice = await usb.requestDevice({ filters: [{ vendorId: 0x0828 }] });
await selectedDevice.open();
...
Closed as not related to library usage.
I'm new to Node JS, I've been trying to send and receive data but I'm always getting an error on the line below. Is there any sample code I can refer to? Thanks in advanced.
Node JS code