From e97487a9d7e0adb697be1deec39ffcdfe5a0c90f Mon Sep 17 00:00:00 2001 From: Jerry Needell Date: Sun, 3 Feb 2019 12:00:02 -0500 Subject: [PATCH] fix readwrite_ntag203.py example --- examples/readwrite_ntag2xx.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/readwrite_ntag2xx.py b/examples/readwrite_ntag2xx.py index 0ac47a4..2f51777 100644 --- a/examples/readwrite_ntag2xx.py +++ b/examples/readwrite_ntag2xx.py @@ -68,7 +68,7 @@ print('Waiting for RFID/NFC card to write to!') while True: # Check if a card is available to read uid = pn532.read_passive_target(timeout=0.5) - print('.', end="", flush=True) + print('.', end="") # Try again if no card is available. if uid is not None: break @@ -78,7 +78,7 @@ print('Found card with UID:', [hex(i) for i in uid]) # Set 4 bytes of block to 0xFEEDBEEF data = bytearray(4) -data[0:4] = [0xFE, 0xED, 0xBE, 0xEF] +data[0:4] = b'\xFE\xED\xBE\xEF' # Write 4 byte block. pn532.ntag2xx_write_block(6, data) # Read block #6