codestyle

autoformat ntag example
This commit is contained in:
Rotzbua
2016-01-04 04:40:47 +01:00
parent 345f66ae0f
commit 4d83339d96

View File

@@ -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);
} }