RPI Pico with generic PN532 on I2C

My pico is connected with a RFID PN532 module via I2C channel at I2C_ADDRESS = 0x24.
I have updated the line _I2C_ADDRESS = 0x24 in PiicoDev_RFID.py

I think line 51 at PiicoDev_Unified.py needs also to be changed with actual sda and scl pins, that are
scl=Pin(17), sda=Pin(16)

I then tried to run read.py and I get :

Traceback (most recent call last):
  File "<stdin>", line 6, in <module>
  File "PiicoDev_RFID.py", line 79, in __init__
  File "PiicoDev_RFID.py", line 284, in reset
  File "PiicoDev_RFID.py", line 95, in _wreg
OSError: [Errno 5] EIO

Are there any other values I have to change in the libraries? Any suggestions as to how to troubleshoot the issue?

1 Like

Hi Mike,

The PN532 wont work with the PiicoDev Libraries as different chipsets are used.

Adafruit have a CircuitPython library available here: Python & CircuitPython | Adafruit PN532 RFID/NFC Breakout and Shield | Adafruit Learning System
Though I couldnt find a Micropython specific port for the board.