Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
RFID example for CryptoShield
const int TAG_LENGTH = 13;
char tag[TAG_LENGTH + 2];
int index = 0;
void setup(){
memset(tag, 0, sizeof(tag));
void loop(){
int readByte =;
if (readByte == 0x02){
// Begining byte, just skip it
else if (readByte == 0x03)
//done reading, 0x03 is the end byte of the tag
//reset the buffer for the next tag
index = 0;
memset(tag, 0, sizeof(tag));
else {
tag[index] = readByte;
index += 1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.