NFC: Text Record¶
The NFC Text Record sample shows how to use the NFC tag to expose a Text record to NFC polling devices. It uses the NFC NDEF libraries.
When the sample starts, it initializes the NFC tag and generates an NDEF message with three Text records that contain the text “Hello World!” in three languages. Then it sets up the NFC library to use the generated message and sense the external NFC field.
The only events handled by the application are the NFC events.
- One of the following development boards:
- nRF52840 Development Kit board (PCA10056)
- nRF52 Development Kit board (PCA10040)
- Smartphone or tablet
- LED 1:
- Indicates if an NFC field is present.
Building and running¶
This sample can be found under
samples/nfc/record_text in the nRF Connect SDK folder structure.
See Building and programming a sample application for information about how to build and program the application.
After programming the sample to your board, test it by performing the following steps:
- Touch the NFC antenna with the smartphone or tablet and observe that LED 1 is lit.
- Observe that the smartphone/tablet displays the encoded text (in the most suitable language).
- Move the smartphone/tablet away from the NFC antenna and observe that LED 1 turns off.
This sample uses the following nRF Connect SDK libraries:
In addition, it uses the Type 2 Tag library from nrfxlib:
The sample uses the following Zephyr libraries:
- GPIO Interface