Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

Connecting a ras pi 4 with a pn532
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Connecting a ras pi 4 with a pn532

by kcx1 on Sat Aug 08, 2020 1:34 am

I cannot seem to get the SPI to work between the raspberry pi and the PN532. Is Mu supposed to auto-detect the board when plugged in? I ran through the blinkatest.py and everything was fine. I'm struggling finding the correct documents. In one place, it is suggested to use SPI as it is more stable, but then the following example is how to connect using I2C (which I haven't tried, because I'll need to solder on some new headers.)

Any help on help on this would be very appreciated!

kcx1
 
Posts: 3
Joined: Sat Aug 08, 2020 1:11 am

Re: Connecting a ras pi 4 with a pn532

by siddacious on Fri Aug 28, 2020 2:33 pm

What exactly have you tried? If you have not already, please look at the full example code in the guide and uncomment the section for SPI setup (and comment out the I2C code).

Try this along with the wiring example for SPI on the Pi. If this does not work, please post exactly the code that you tried (with modifications for SPI) as well as clear, well lit photos that make it easy to see how the PN532 is wired up to the PI

siddacious
 
Posts: 305
Joined: Fri Apr 21, 2017 3:09 pm

Re: Connecting a ras pi 4 with a pn532

by kcx1 on Sun Sep 20, 2020 1:59 pm

siddacious wrote:What exactly have you tried? If you have not already, please look at the full example code in the guide and uncomment the section for SPI setup (and comment out the I2C code).

Try this along with the wiring example for SPI on the Pi. If this does not work, please post exactly the code that you tried (with modifications for SPI) as well as clear, well lit photos that make it easy to see how the PN532 is wired up to the PI



Hi Siddacious,

I must have missed the commented out sections in the guide. (I'll admit, I was probably a bit tired!) I think I was also confused with trying to use MU.

I wrote out the code listed in the full code section that you suggested into the REPL inside the command line of my raspberry pi and now I have the PN532 listening for cards.

Thank you so much for your help! I'm excited to start playing with this!

kcx1
 
Posts: 3
Joined: Sat Aug 08, 2020 1:11 am

Please be positive and constructive with your questions and comments.