From: Elizabeth T. <et...@pr...> - 2013-07-17 12:33:06
|
Hello, I'm new to pyusb and to working with usb devices in general. I'm trying to read voltage data from a Tenma 72-7732 multimeter, but I'm having some problems. This is my code so far: def main(): import usb.core import usb.util import usb.backend #find device dev = usb.core.find(idVendor=0x1a86, idProduct=0xe008) # did you find it? if dev is None: raise ValueError('Device not found') else: print "Device found" dev.set_configuration() endpoint = dev[0][(0,0)][0] data = dev.read(endpoint.bEndpointAddress, endpoint.wMaxPacketSize, 0, 100000) print data main() This finds the device, but gives a timeout error when it tries to read data. Do you have any idea what might have gone wrong? The multimeter has very poor documentation, so I can't go there for advice. Thanks, Libby |