adafruit / Adafruit-PN532

Arduino library for SPI and I2C access to the PN532 RFID/Near Field Communication chip
Other
421 stars 265 forks source link

M5 paper UART #84

Closed openmotion closed 3 years ago

openmotion commented 3 years ago

hello i have a M5paper ( ESP32 ), i have a port C grove, GPIO 18 / GPIO 19, but i have the error : Didn’t find PN53x board

`#include

include <PN532/PN532/PN532.h>

include

include "driver/gpio.h"

include "driver/adc.h"

include <PN532/PN532_HSU/PN532_HSU.h>

//HardwareSerial Serial1(1);

PN532_HSU pn532hsu(Serial1); NfcAdapter nfc(pn532hsu); void setup(void) { M5.begin(); Serial1.println("NDEF begin"); delay(5000); Serial1.begin(9600, SERIAL_8N1, 18, 19);

//Wire.begin(18, 19);

Serial1.println("NDEF Reader"); nfc.begin(); }

void loop(void) { SERIAL.println("\nScan a NFC tag\n"); if (nfc.tagPresent()) { NfcTag tag = nfc.read(); tag.print(); } //delay(5000); M5.update(); delay(100); }`

and second test

`#include

include <PN532/PN532/PN532.h>

include

include <PN532/PN532_SWHSU/PN532_SWHSU.h>

include "SoftwareSerial.h"

//HardwareSerial Serial1(1); SoftwareSerial SWSerial(19, 18); PN532_SWHSU pn532swhsu(SWSerial); NfcAdapter nfc(pn532swhsu);

void setup(void) { M5.begin(); Serial1.println("NDEF begin"); //delay(5000); Serial1.begin(9600); Serial1.println("NDEF Reader"); nfc.begin(); }

void loop(void) { SERIAL.println("\nScan a NFC tag\n"); if (nfc.tagPresent()) { NfcTag tag = nfc.read(); tag.print(); } //delay(5000); M5.update(); delay(100); }`

ladyada commented 3 years ago

hi, M5 has tech support they can help you!