Ejemplo n.º 1
0
def get_tag_info():
    rf = RF()
    t_id, nameP = rf.read_tag()
    if t_id != None:
        datos = captureInfoCam()
        timest = int(time.time())
        
        if datos == None:
            return {'ts': timest, 'product_id': t_id, 'type_id': nameP ,'gender': None, 'age': None}
        
        return {'ts': timest, 'product_id': t_id, 'type_id': nameP ,'gender': datos[1], 'age': datos[0]}