def write(ser): #first finger scan setBaud(ser) data = genImg.getHeader() ser.write(bytearray(data)); time.sleep(1) s = ser.read(ser.inWaiting()) print([hex(ord(c)) for c in s]) genImg.parse(s) # generate character file of the finger image. setBaud(ser) data = Img2Tz.getHeader(0x01) ser.write(bytearray(data)); time.sleep(1) s = ser.read(ser.inWaiting()) print([hex(ord(c)) for c in s]) Img2Tz.parse(s) setBaud(ser) data = Search.getHeader(0x01, 0x0000, 0x0064) ser.write(bytearray(data)); time.sleep(1) s = ser.read(ser.inWaiting()) print([hex(ord(c)) for c in s]) print Search.parse(s)
def write(): setBaud() #data =genImg() data = Img2Tz.getHeader(0x01) print data ser.write(bytearray(data)); time.sleep(1) s = ser.read(ser.inWaiting()) print type(s), len(s) print([hex(ord(c)) for c in s]) print Img2Tz.parse(s)