Good Afternoon,
I've been searching everywhere to try and figure this out. I'm using the SparkFun SRTR with a RedBoard, and programming using Arduino IDE on my Raspberry Pi.
I've downloaded the Sparkfun SRTR Library, and have successfully used the examples. I used the example to write a new EPC onto an RFID tag "HELLO!". From the Write EPC example, I was able to print my resulting EPC to verify that it took. When I then go to read the tag, it only prints the Hex version and not "HELLO!". I would like it to read and print "HELLO!" instead of the Hex equivalent.
The examples I'm using are here: SparkFun_Simultaneous_RFID_Tag_Reader_Library/examples at master · sparkfun/SparkFun_Simultaneous_RFID_Tag_Reader_Library · GitHub
I'm trying to alter this portion of the example so I can get the "HELLO!" instead of the hex numeric version.
byte myEPC[12]; //Most EPCs are 12 bytes
byte myEPClength;
byte responseType = 0;
while (responseType != RESPONSE_SUCCESS)//RESPONSE_IS_TAGFOUND)
{
myEPClength = sizeof(myEPC); //Length of EPC is modified each time .readTagEPC is called
responseType = nano.readTagEPC(myEPC, myEPClength, 500); //Scan for a new tag up to 500ms
Serial.println(F("Searching for tag"));
}
//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);
//Print EPC
Serial.print(F(" epc["));
for (byte x = 0 ; x < myEPClength ; x++)
{
if (myEPC[x] < 0x10) Serial.print(F("0"));
Serial.print(myEPC[x], HEX);
Serial.print(F(" "));
}
Serial.println(F("]"));
}