-->
Page 1 of 1

ESP8266 12E NodeMCU V3 connect with PN532 nfc

PostPosted: Mon Oct 26, 2020 2:49 pm
by Peter Válek
Hello everyone!

I am trying connect my ESP8266 ESP-12E CH340G NodeMCU V3 with PN532 NFC chip.

But NodeMCU can't find my NFC Chip.

nfc.getFirmwareVersion() is always 0

Here is my code (Using newest libraries from github):
Code: Select all#if 1
  #include <SPI.h>
  #include <ESP8266WiFi.h>
  #include <PN532_SPI.h>
  #include <NfcAdapter.h>
  #include <PN532.h>

  PN532_SPI pn532spi(SPI, 15);
  PN532 nfc(pn532spi);
#elif 0
  #include <PN532_HSU.h>
  #include <PN532.h>
 
  PN532_HSU pn532hsu(Serial1);
  PN532 nfc(pn532hsu);
else
  #include <Wire.h>
  #include <PN532_I2C.h>
  #include <PN532.h>
  #include <NfcAdapter.h>

  PN532_I2C pn532i2c(Wire);
  PN532 nfc(pn532spi);
#endif


void setup() {
  // put your setup code here, to run once:
  Serial.begin(115200);
  Serial.println("NDEF Reader");
 
}

void loop() {
  // put your main code here, to run repeatedly:
  Serial.println("\nScan a NFC tag\n");
  nfc.begin();
  uint32_t versiondata = nfc.getFirmwareVersion();
  Serial.print(versiondata);
   if (! versiondata)
   {
       Serial.print("Didn't find");
       while(1);
   }
   delay(5000);
}



Here is my connection:
I have also tried connect SS to D4 but same result.

Image

Thanks everyone for your help !