diff --git a/lab03/README.md b/lab03/README.md index ab0a69aebd578c2ff7cbc3f48205d40ab56d9616..4916d8b5892f5b2652586c382e812c15b04e5a5c 100644 --- a/lab03/README.md +++ b/lab03/README.md @@ -50,14 +50,23 @@ import time card = Mifare() card.i2c_channel=9 card.reset_i2c() +# Configure the PN532 for the number of retries attempted +# during the InListPassiveTarget operation (set to +# MIFARE_SAFE_RETRIES=5 for a safe one-time check card.set_max_retries(MIFARE_SAFE_RETRIES) - +#Send a SAMCONFIGURATION (Secure Access Module) command to the PN532 +card.SAMconfigure() while(True): uuid = card.scan_field() if uuid: print(uuid) + address = card.mifare_address(0,1) + card.mifare_auth_a(address,MIFARE_FACTORY_KEY) + data = card.mifare_read(address) + print(data) + card.in_deselect() # In case you want to authorize a different sector. elif(int(time.time())%5==0): - print("Not find any tag, wait for next 5 sec...") + print("Not find any new tag, wait for next 5 sec...") sleep(1) ``` ### Zadania (5pkt.):