Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- device.read(endpoint.bEndpointAddress, endpoint.wMaxPacketSize)
- +--------------------- Report type
- | +------------------ Weight Stable (tray not moving)
- | | +--------------- grams (not pounds)
- | | | +------------ whatever
- | | | | +--------- 2 grams
- | | | | | +------ 0 x 256 grams
- | | | | | |
- V V V V V V
- [3, 4, 2, 0, 2, 0]
- # ep_out.write('x07x04x02x00x00x00', 6)
- ep_out.write([0x07, 0x04, 0x02, 0x00, 0x00, 0x00], 6)
- handle = hid_open(0x7b7c, 0x301, NULL);
- buf[0] = 0x07;
- buf[1] = 0x04;
- buf[2] = 0x02;
- res = hid_write(handle, buf, 3);
- h = hid.device()
- h.open(0x7b7c, 0x301)
- print("Manufacturer: %s" % h.get_manufacturer_string())
- print("Product: %s" % h.get_product_string())
- print("Serial No: %s" % h.get_serial_number_string())
- res = h.write([0x07, 0x04, 0x02, 0,0,0])
- res = h.write([0x07, 0x04, 0x02, 0,0,0])
- res = h.write([0x07, 0x04, 0x02, 0,0,0])
- res = h.write([0x07, 0x04, 0x02, 0,0,0])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement