I want to use a fingerprint sensor with an Arduino nano esp32 and the Adafruit Fingerprint sensor library. It works fine with an Arduino Uno. My problem now is that the nano doesn´t really seem to have hardwareserial 1 and 2. I researched that they should be on GPIO 9 + 10 || GPIO 16 + 17. I tried using Serial1 which should be GPIO 9+10 -> D6+D7, but it didn´t work. Serial2 is not possible, cause the nano esp32 does not have the GPIO 17...
Any ideas which Serial I should use and which pins they are on the microcontroller?
(Serial 0 is not an option because the esp32 needs to be connected to my PC)
#include <Adafruit_Fingerprint.h>
#if (defined(__AVR__) || defined(ESP8266)) && !defined(__AVR_ATmega2560__)
// For UNO and others without hardware serial, we must use software serial...
// pin #2 is IN from sensor (GREEN wire)
// pin #3 is OUT from arduino (WHITE wire)
// Set up the serial port to use softwareserial..
SoftwareSerial mySerial(2, 3);
#else
// On Leonardo/M0/etc, others with hardware serial, use hardware serial!
// #0 is green wire, #1 is white
#define mySerial Serial1
#endif
Adafruit_Fingerprint finger = Adafruit_Fingerprint(&mySerial);