lucafaccin / esp-pn532

Port of the Adafruit PN532 Library for Arduino to ESP32
20 stars 11 forks source link

I2C write failed #3

Open zimsekdanilo opened 2 years ago

zimsekdanilo commented 2 years ago

I have error using the library, when trying to get firmware version.

init: successE (1749) PN532: writecommand I2C write failed: Operation timeout because the bus is busy. E (3779) PN532: writecommand I2C write failed: Sending command error, slave doesn’t ACK the transfer.

bool a = init_PN532_I2C(14, 15, 5, 4, 1);
printf(a ? "init: success" : "init: fail");
SAMConfig();
uint8_t uid = 0; // Buffer to store the returned UID
uint8_t uidLength;    // Length of the UID (4 or 7 bytes depending on ISO14443A card type)
uint32_t ver = getPN532FirmwareVersion();
printf(ver);

Connected pins: PIN 14 - SDA PIN 15 - SCL VCC GND.

Others are not used. Should I put some other numbers when calling init_PN532_I2C?

bgiovanni commented 2 years ago

Check the dipswitch on the NFC board.

ElPernotador commented 1 year ago

I have the same problem ussing ESP IDF 5.1 board ESP32S3