Example #1
0
                np.write()
                time.sleep_ms(3000)
                #fim do retorno visual
                print("-----------------------------")
                print("Scan a CARD to ADD or REMOVE from memory")
            else:
                print("I do not know this CARD, adding...")
                stp.addCard(cardTag)
                #add retorno visual
                np[0] = GREEN
                np.write()
                time.sleep_ms(3000)
                #fim do retorno visual
                print("-----------------------------")
                print("Scan a CARD to ADD or REMOVE from memory")
    else:

        if stp.IsMaster(cardTag):
            programMode = True
            print("Hello Master - Entered Program Mode")
            amount = stp.amount()
            print("I have", amount, "card(s) on memory.\n")
            print("Scan a CARD to ADD or REMOVE from memory")
            print("Scan Master Card again to Exit Program Mode")
            print("-----------------------------")
        else:
            if stp.findCard(cardTag)[0]:
                granted(1)
            else:
                denied()