NTAG I2C

cancel
Showing results for 
Search instead for 
Did you mean: 

NTAG I2C

783 Views
ako1
Contributor I

Please help with the following:

I purchased a NTAG I2C plus Explorer Kit and it works fine, I have an Arduino UNO I also like to test the NTAG I2C chip with, so I am connecting an Flex Kit antenna with the NTAG I2C on to the Arduino Uno, but I am not able to find the software associate with this. I look for an Arduino Library that support this ??.  Please direct me to the download for the NTAG I2C plus kit for Arduino® pinout software/firmware. and any other guidance that would be helpful.

Thanks very much in advance :-)

0 Kudos
6 Replies

460 Views
IvanRuiz
NXP TechSupport
NXP TechSupport

Hello,

You could refer to the MCUXpresso SDK Builder i.e. for FRDM-K64F and take it as a reference to migrate to your development board:

Welcome | MCUXpresso SDK Builder 

Once you have selected the development board -> Add the software component NTAG I2C.

Hope this helps!

Regards,

Ivan.

0 Kudos

460 Views
ako1
Contributor I

Thanks Ivan, it gives me some clue to where to pick up the modules I need (but still quit challenging for me :-) )

0 Kudos

460 Views
yimin_wang
Contributor I

Hi Allan,

Did you figure out which sets of library files to use for simple read and write to NTAG?

0 Kudos

460 Views
molecule
Contributor I

Can you please expand on this reply? So I downloaded the FRDM-K64F SDK w/ the NTAG I2C software component, then I clicked on FRDM-K64F-> middleware -> ntag-i2c-plus

That gives me quite a lot of directory structure to poke through: Dropbox - Screenshot 2018-06-27 16.39.24.png 

I'm just trying to do a simple read and write via I2C from an Arduino Uno. Perhaps using the Arduino Wire library. Can you give any more guidance?

0 Kudos

460 Views
ako1
Contributor I

Hi Molly, Thanks, and yes you are right, I should probably use the Arduino Wire Lib. and then take out the necessary modules from FRDM-K64F SDK and use this to make a simple test of some of the basic functions I need for my POC.

Make a project from these files. :-) I had hoped there was a very easy way, because it is normally not my thing to do so challenging things with Arduino yet :-)  ( I will try tonight or over the weekend)

0 Kudos

414 Views
lucentinian
Contributor I

Hello @ako1 !

Did you get your arduino project talking with the NTAG device? I'm trying to do the same, asking the device to provide me the version using the GET_VERSION command, but I get a bunch of zeroes.

Here my code:

#include <Wire.h>

#define NTAG_SLAVE_ADDRESS 0x55
#define NTAG_VERSION_DATA_LENGTH 8

#define NO_DEVICE 0

#define GOT_DEVICE 1

int ntag_device_id;
char ntag_version_data[NTAG_VERSION_DATA_LENGTH];

void setup() {
Serial.begin(115200); while (!Serial) { delay(10);}

int ntag_version_length;
ntag_device_id = retrieveI2CDeviceVersion(NTAG_SLAVE_ADDRESS,ntag_version_data,ntag_version_length);

}

int retrieveI2CDeviceVersion(int slaveAddress, char * responseData, int& responseLength) {
responseLength = NTAG_VERSION_DATA_LENGTH;
const char request[] = { 0x60, };
Wire.beginTransmission(slaveAddress);
Wire.write(request,sizeof(request));
Wire.endTransmission();
Wire.requestFrom(slaveAddress,responseLength);
for (int i = 0; i < responseLength; i++) {
  for(int t = 0; t < 5 && !Wire.available(); t++) { Serial.println("Waiting for NTAG to reply"); delay(100); }
  if (!Wire.available()) {return NO_DEVICE;}
  responseData[i] = Wire.read();
}

return GOT_DEVICE;

}

void loop() { delay(100); }

0 Kudos