| nRF5 SDK v12.0.0 |

Choose documentation: | nRF5 SDK | S130 SoftDevice API | S132 SoftDevice API | S212 SoftDevice API | S332 SoftDevice API

All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Adafruit Tag Reader Example

The NFC Adafruit Tag Reader Example shows how to use the Adafruit NFC Shield library in combination with the Type 2 Tag parser and the Message and record parser to create an NFC polling device. This device can then be used to read and parse the content of an NFC Type 2 Tag.

The example requires the Adafruit PN532 NFC Shield. It can be run on both nRF51 and nRF52 devices.

When the example application starts, it initializes the Adafruit PN532 NFC Shield and waits for a Type 2 Tag to appear in the field. When a tag is detected, the application reads it and parses its content. After successful parsing, the tag content is printed on the serial port.

You can find the source code and the project file of the example in the following folder: `<InstallFolder>\examples\nfc\adafruit_tag_reader`

Note
  This application is not power optimized!

# Testing

Test the Adafruit Tag Reader Example application by performing the following steps:

1. Compile and program the application. Make sure that the ENABLE_DEBUG_LOG_SUPPORT and T2T_PARSER_ENABLE macros are defined on the project settings level to enable output.
2. Start a terminal emulator like PuTTY and connect to the used COM port with the following UART settings:
   - Baud rate: 115.200
   - 8 data bits
   - 1 stop bit
   - No parity
   - HW flow control: RTS/CTS
3. Touch a Type 2 Tag to the Adafruit PN532 NFC Shield. You can use one of the other NFC examples as tag (for example, the Launch App Example or the URI Message Example).
4. Observe the output on the serial port. The content of the tag is printed there.
5. After a little delay, the tag can be read again.