M6E-NANO , write RFID data through serial monitor

Hi guys...i am using M6E-NANO and arduino to read/write data to RFID
Here is the code from sparkfun example library, its there anyway to take the 8 digits that i key in from serial monitor to put at hexEPC?

void loop()
{
Serial.println(F("Get all tags out of the area. Press a key to write EPC to first detected tag."));
if (Serial.available()) Serial.read(); //Clear any chars in the incoming buffer (like a newline char)
while (!Serial.available()); //Wait for user to send a character
Serial.read(); //Throw away the user's character

//"Hello" Does not work. "Hell" will be recorded. You can only write even number of bytes
//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

char hexEPC[] = {0x00, 0x01, 0x07, 0x39}; //You can only write even number of bytes
byte responseType = nano.writeTagEPC(hexEPC, sizeof(hexEPC));

if (responseType == RESPONSE_SUCCESS)
Serial.println("New EPC Written!");
else
Serial.println("Failed write");
}

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.