codestyle
autoformat ntag example
This commit is contained in:
@@ -36,24 +36,23 @@ void loop() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
byte PSWBuff[] = {0xFF, 0xFF, 0xFF, 0xFF}; //32 bit PassWord default FFFFFFFF
|
||||||
|
byte pACK[] = {0, 0}; //16 bit PassWord ACK returned by the NFCtag
|
||||||
|
|
||||||
byte PSWBuff[]={0xFF,0xFF,0xFF,0xFF}; //32 bit PassWord default FFFFFFFF
|
Serial.print("Auth: ");
|
||||||
byte pACK[]={0,0}; //16 bit PassWord ACK returned by the NFCtag
|
Serial.println(mfrc522.PCD_NTAG216_AUTH(&PSWBuff[0], pACK)); //Request Authentification if return STATUS_OK we are good
|
||||||
|
|
||||||
Serial.print("Auth: ");
|
//Print PassWordACK
|
||||||
Serial.println(mfrc522.PCD_NTAG216_AUTH(&PSWBuff[0],pACK)); //Request Authentification if return STATUS_OK we are good
|
Serial.print(pACK[0], HEX);
|
||||||
|
Serial.println(pACK[1], HEX);
|
||||||
|
|
||||||
//Print PassWordACK
|
byte WBuff[] = {0x00, 0x00, 0x00, 0x04};
|
||||||
Serial.print(pACK[0],HEX);
|
byte RBuff[18];
|
||||||
Serial.println(pACK[1],HEX);
|
|
||||||
|
|
||||||
byte WBuff[] = {0x00,0x00,0x00,0x04};
|
//Serial.print("CHG BLK: ");
|
||||||
byte RBuff[18];
|
//Serial.println(mfrc522.MIFARE_Ultralight_Write(0xE3, WBuff, 4)); //How to write to a page
|
||||||
|
|
||||||
//Serial.print("CHG BLK: ");
|
mfrc522.PICC_DumpMifareUltralightToSerial(); //This is a modifier dunp just cghange the for cicle to < 232 instead of < 16 in order to see all the pages on NTAG216
|
||||||
//Serial.println(mfrc522.MIFARE_Ultralight_Write(0xE3, WBuff, 4)); //How to write to a page
|
|
||||||
|
|
||||||
mfrc522.PICC_DumpMifareUltralightToSerial(); //This is a modifier dunp just cghange the for cicle to < 232 instead of < 16 in order to see all the pages on NTAG216
|
delay(3000);
|
||||||
|
|
||||||
delay(3000);
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user