Error constructing PN532: Message transmission failed
Closed this issue · 1 comments
Nikhil9876 commented
I am using PN532 NFC with imp005.
local spi = hardware.spi0;
local ncs = hardware.pinD;
local rstpd_l = hardware.pinQ;
local irq = hardware.pinN;
spi.configure(USE_CS_L, 15000);
function constructorCallback(error) {
server.log("Custructor");
if(error != null) {
server.log("Error constructing PN532: " + error);
return;
}
// It's now safe to use the PN532
}
reader <- PN532(spi, ncs, rstpd_l, irq, constructorCallback);
hfiennes commented
Please look at the notes on using SPI with imp005 here: https://developer.electricimp.com/hardware/imp/imp005_hardware_guide
You likely need to (a) reduce the SPI clock rate, and (b) add an R-C filter to the MOSI pin.