Wiring NFC reader #13
Replies: 3 comments
-
I guess i found my answer: according to this schematics the MISO/MOSI/SCK/CS0 are defined by default... Side question: would it be possible to use I2C instead of SPI? Should work as well, isnt? |
Beta Was this translation helpful? Give feedback.
-
You could try swapping out the existing nfc/PN532 setup at the top of The use of Also beware that there seem to be lots of issues with PN532 modules (especially low-quality/cheap/counterfeit) and use of I2C. |
Beta Was this translation helpful? Give feedback.
-
Hi Thorsten, Glad you were able to find the answer and yes, the ESP32 like Arduino boards it has denominated pins for SPI and such. Regarding I2C, i tried it, couldn’t make it work although didn’t really put a lot of effort into it since SPI already works but the PN532 library has it implemented so i suppose it should work Also, thanks for pointing this out, I’ll be updating the README to including the wiring which should’ve been there from the beginning 🤡 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi
earlier you had in your source defined all the NFC-reader pins:
`// // If using the breakout with SPI, define the pins for SPI communication.
#define PN532_SCK (D5)
#define PN532_MOSI (D7)
#define PN532_SS (D8)
#define PN532_MISO (D6)
#define RESET_PIN (D3)
PN532_SPI pn532spi(SPI, PN532_SS);
PN532 nfc(pn532spi);`
In the refactored code you have only the pin 5 defined - and i cannot find other references.
#define PN532_SS (5) PN532_SPI pn532spi(SPI, PN532_SS);
So... stupid question: which pins/wiring is finally required to have this up and running (beside obvious VCC and GND).
I don't find definitions of SCK, MOSI, MISO and RESET in the code.
Is it only PIN5? (IO5 // D8)?
Trying to understand the SPI protocol it seems MISO/MOSI/SS (or "new" POCI/PICO/CS) are mandatory for SPI... so what did i miss?
Best
Thorsten
Beta Was this translation helpful? Give feedback.
All reactions