### Install pn532pi Library Source: https://github.com/gassajor000/pn532pi/blob/master/README.md Install the library using pip. This is the first step to using the library. ```bash pip install pn532pi ``` -------------------------------- ### Clone pn532pi Git Repository Source: https://github.com/gassajor000/pn532pi/blob/master/README.md Clone the repository to get the library and its examples. Ensure to use the --recursive flag to include submodules. ```bash git clone --recursive https://github.com/gassajor000/pn532pi.git ``` -------------------------------- ### Configure PN532 for SPI Interface Source: https://github.com/gassajor000/pn532pi/blob/master/README.md Configure the PN532 object for SPI communication. This example shows how to set the SPI interface and slave select pin. ```python # Set the desired interface to True SPI = True I2C = False HSU = False ... if SPI: PN532_SPI = Pn532Spi(Pn532Spi.SS0_GPIO8) nfc = Pn532(PN532_SPI) ``` -------------------------------- ### Initialize PN532 with I2C Interface Source: https://github.com/gassajor000/pn532pi/blob/master/README.md Initialize the PN532 object using the I2C interface. This code snippet shows the basic setup for I2C communication. ```python from pn532pi import Pn532I2c, Pn532 i2c = Pn532I2c(1) nfc = Pn532(i2c) def setup(): nfc.begin() # ... ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.