From 3a50b1a33e8169f21af9891a8575d9a742404603 Mon Sep 17 00:00:00 2001
From: Your Name <you@example.com>
Date: Tue, 12 Jan 2021 14:24:02 +0100
Subject: [PATCH] Poprawiono obsluge SAM w nonblocking

---
 lab03/README.md | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/lab03/README.md b/lab03/README.md
index ab0a69a..4916d8b 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.):
-- 
GitLab