adafruit / Adafruit_CircuitPython_PN532

CircuitPython driver for the PN532 NFC/RFID Breakout and PN532 NFC/RFID Shield
MIT License
91 stars 47 forks source link

Add I2C address #62

Closed caternuson closed 1 year ago

caternuson commented 1 year ago

For #49. Adds ability to specify alternate I2C address for PN532.

Only tested as far as not breaking anything with current library and default address running pn532_simpletest example on a Feather M4:


Adafruit CircuitPython 7.3.3 on 2022-08-29; Adafruit Feather M4 Express with samd51j19
>>> import pn532_simpletest
Found PN532 with firmware version: 1.6
Waiting for RFID/NFC card...
......Found card with UID: ['0x27', '0xe8', '0xca', '0x35']
.Found card with UID: ['0x27', '0xe8', '0xca', '0x35']
.Found card with UID: ['0x27', '0xe8', '0xca', '0x35']
.Found card with UID: ['0x27', '0xe8', '0xca', '0x35']
.Found card with UID: ['0x27', '0xe8', '0xca', '0x35']
.Found card with UID: ['0x27', '0xe8', '0xca', '0x35']
.Found card with UID: ['0x27', '0xe8', '0xca', '0x35']