Hi
I am using the code below to try and read tags. its works fine with Arduino Nano and Arduino Uno.
I am using the PN532 in I2C mode. On the Arduinos I just connect the readers SDA and SCL to A4 and A5 and it works. The reader is the following
On the Xiao nrf52840 I connect to D4 (SDA) and D5 (SCL). The PN532 is not found, do I need to change the code somewhere to tell the nrf52840 which are the SDA and SCL pins. If so how do I do this please?
Hi
Yes, I have selected the right board which is Seeed XAIO BLE -nrf52840
The Arduino example sketches and a few others run fine. I am also having trouble getting a I2C 128x128 OLED (SSD1327) to work as well.
I am running version 2.6.1 under board manager. I did try version 1.0.0 but its not making any difference.
If I run the I2C scanner code below it finds the address for the PN532 or OLED so the connection seems fine
#include <Wire.h> //include Wire.h library
void setup()
{
Wire.begin(); // Wire communication begin
Serial.begin(9600); // The baudrate of Serial monitor is set in 9600
while (!Serial); // Waiting for Serial Monitor
Serial.println("\nI2C Scanner");
}
void loop()
{
byte error, address; //variable for error and I2C address
int nDevices;
Serial.println(“Scanning…”);
nDevices = 0;
for (address = 1; address < 127; address++ )
{
// The i2c_scanner uses the return value of
// the Write.endTransmisstion to see if
// a device did acknowledge to the address.
Wire.beginTransmission(address);
error = Wire.endTransmission();
if (error == 0)
{
Serial.print("I2C device found at address 0x");
if (address < 16)
Serial.print("0");
Serial.print(address, HEX);
Serial.println(" !");
nDevices++;
}
else if (error == 4)
{
Serial.print("Unknown error at address 0x");
if (address < 16)
Serial.print("0");
Serial.println(address, HEX);
}