i want to use the PN532 nfc-reader with Software Serial on my ESP32. On arduino i can use the PN532_SWHSU library for connection via software serial but on Plattform io i dont know why it will not working.
i have added the softwareSerial library and the PN532 library.
You need to carefully look at the library code. You have the following constructors
The last one takes a HardwareSerial* as the second argument, the first one being the reset pin.
However, you have another problem: a SoftwareSerial object implementation, such as the one from this library or this library, does not inherit from HardwareSerial. Really, the Adafruit library should be more liberal and take in Stream*; but it doesn’t it.
So this leads you to either modify the library to acommodate the possibility of a software serial, or, use a hardware serial. Since the ESP32 has three hardware UARTs, I don’t see a point in using a software implementation in the first place.