'Serial1' was not declared in this scope

Get this error message with Seeeduino v4.2 and NFC tag v1.1. (Arduino 1.8.10 IDE)

–‘Serial1’ was not declared in this scope–

Get the same error with UART or SPI interface and the proper card selected.



CODE:

#if 0 // use SPI

#include <SPI.h>

#include <PN532/PN532_SPI/PN532_SPI.h>

PN532_SPI pn532spi(SPI, 9);

NfcAdapter nfc = NfcAdapter(pn532spi);

#elif 1 // use hardware serial

#include <PN532/PN532_HSU/PN532_HSU.h>

PN532_HSU pn532hsu(Serial1);

NfcAdapter nfc(pn532hsu);

#elif 0 // use software serial

#include <PN532/PN532_SWHSU/PN532_SWHSU.h>

#include “SoftwareSerial.h”

SoftwareSerial SWSerial(2, 3);

PN532_SWHSU pn532swhsu(SWSerial);

NfcAdapter nfc(pn532swhsu);

#else //use I2C

#include <Wire.h>

#include <PN532/PN532_I2C/PN532_I2C.h>

PN532_I2C pn532_i2c(Wire);

NfcAdapter nfc = NfcAdapter(pn532_i2c);

#endif



Thanks helping

Sorry I thought I2C but I wrote SPI

in UART OR SPI

Thanks