Getting data from NFC, LPC8N04 MCU

取消
显示结果 
搜索替代 
您的意思是: 

Getting data from NFC, LPC8N04 MCU

无评分

Getting data from NFC, LPC8N04 MCU

Hello NFC Community,

 

This document focuses to the configuration of the LPC8N04 to be controlled by the data it receives though the NFC interface.

The document is based on the nfc_eeprom project of LPC8N04’s SDK.

pastedImage_1.png

It will basically be necessary to modify the code within while(1) loop as below.

 

Get the data from NFC and store it on d_Data buffer:

           

if (NDEFT2T_GetMessage(g_NdefInstance, g_Data, sizeof(g_Data))) {

 /* Save NDEF Data into EEPROM */

 //Chip_EEPROM_Write(LPC_EEPROM, 0, g_Data, sizeof(g_Data));

 }

Clear respective semaphore and Flag:

/** Clear Memory Write Semaphore */

 releaseMemSemaphore();

 /** Clear Write Flag */

 g_TargetWritten = 0;

 

Now that the information is in the g_Data buffer now you may proceed to verify the received data with the one expected to trigger a function e.g., to turn on/off a led.

 

if(g_Data[7] == 'A')

 {

 Led_Set(true);

 }

 else if(g_Data[7] == 'B')

 {

 Led_Set(false);

 }‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

 

 

On the other side, it will only be necessary to approach the reader to the LPC8N04's antenna and the NDEFT2T_GetMessage(g_NdefInstance, g_Data, sizeof(g_Data)) function will get the data and store it on the g_data buffer mentioned above.

Happy development!

BR,

Ivan.

版本历史
修订号:
第2页 共2页
最后更新:
‎09-10-2020 02:34 AM
更新人: