NFC Tag Reader Function

  • Share this:

Code introduction


This function uses the NfcReader class from the PyNFC library to connect to an NFC reader, read the information of the NFC tag connected, and return the information.


Technology Stack : PyNFC library

Code Type : NFC reads tag information

Code Difficulty : Intermediate


                
                    
def read_tag(tag):
    from nfc import NfcReader
    reader = NfcReader()
    reader.connect()
    tag = reader.read_tag()
    reader.disconnect()
    return tag                
              
Tags: