Simultaneous RFID Tag Reader Hookup Guide
Example 2 - Read EPC
While a constant read is fun and interactive, it can be an overwhelming amount of data for some projects. The 2nd example shows how to do a single shot read.
If you are unfamiliar with how RFID tag memories work, please review our tutorial here.
File > Examples > SparkFun Simultaneous RFID Tag Reader Library > Examples
Open Example 2 from the examples menu. Then load it onto your RedBoard or Uno.
Tag EPC LULZ detected!
.readTagEPC() is the main function call of this example. Pass it an array of bytes (in almost all cases EPCs are 12 bytes), the size of the array (12), and an amount of time to scan before giving up (500ms is default). The function will return with RESPONSE_SUCCESS if a tag is detected and the EPC will be stored in the array you gave it.
responseType = nano.readTagEPC(myEPC, myEPClength, 500); //Scan for a new tag up to 500ms
The buzzer is connected to pins 9 and 10
//Beep! Piano keys to frequencies: http://www.sengpielaudio.com/KeyboardAndFrequencies.gif tone(BUZZER1, 2093, 150); //C delay(150); tone(BUZZER1, 2349, 150); //D delay(150); tone(BUZZER1, 2637, 150); //E delay(150);
We’ve included a buzzer on the shield to allow feedback to the user. In this example we play a simple three note melody to indicate a tag has been detected.