Simultaneous RFID Tag Reader Hookup Guide

Pages
Contributors: Nate
Favorited Favorite 4

Example 3 - Write EPC

It’s time to do what used to be impossible: Write to a tag!

Load Example 3 to your RedBoard, and open up your serial monitor.

alt text

This example shows how to write your own EPC to a tag.

char stringEPC[] = "Hello!"; //You can only write even number of bytes
byte responseType = nano.writeTagEPC(stringEPC, sizeof(stringEPC) - 1); //The -1 shaves off the \0 found at the end of string

Remember, you cannot change the TID of a tag (that’s its truly unique tag ID), but changing the EPC is a great way to keep track of which tag is which. Setting EPCs to WRENCH or PILL#317 make it easier to visually identify in code which tag you are looking for and need to respond to.

nano.setWritePower(500); //5.00 dBm. Higher values may cause USB port to brown out
//Max Write TX Power is 27.00 dBm and may cause temperature-limit throttling

This example introduces a new function .setWritePower(). Similar to setReadPower, this sets the power level when writing to a tag.

If you are using an external power supply and need to write to a tag feel free to boost this value to 20 or even 27dBm. Because you will rarely be writing to a tag the module shouldn’t reach temperature throttling.