Skip to content

Instantly share code, notes, and snippets.

@fletcherm
Last active December 21, 2015 09:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fletcherm/6284018 to your computer and use it in GitHub Desktop.
Save fletcherm/6284018 to your computer and use it in GitHub Desktop.
public byte[] ReadModelNumber() {
var loader = new HidDeviceLoader();
var device = loader.GetDevices(0x1234, 0x9876).First();
HidStream stream;
device.TryOpen(out stream);
var message = new byte[] { 0, 0xaa };
stream.Write(message);
return stream.Read();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment