Skip to content

Commit

Permalink
change example to arduino types
Browse files Browse the repository at this point in the history
  • Loading branch information
ljos committed Oct 7, 2013
1 parent 6724ed0 commit f2b06cd
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions examples/authenticate/authenticate.ino
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ void setup() {
Serial.println("Looking for MFRC522.");
nfc.begin();

uint8_t version = nfc.getFirmwareVersion();
byte version = nfc.getFirmwareVersion();
if (! version) {
Serial.print("Didn't find MFRC522 board.");
while(1); //halt
Expand All @@ -25,21 +25,22 @@ void setup() {
Serial.println(".");
}

uint8_t keyA[6] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, };
uint8_t keyB[6] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, };
byte keyA[6] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, };
byte keyB[6] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, };

void loop() {
uint8_t status;
uint8_t data[MAX_LEN];
uint8_t serial[5];
uint8_t i, j;
byte status;
byte data[MAX_LEN];
byte serial[5];
int i, j, pos;

status = nfc.requestTag(MF1_REQIDL, data);

if (status == MI_OK) {
Serial.println("Tag detected.");
Serial.print("Type: ");
Serial.print(data[0], HEX);
Serial.print(", ");
Serial.println(data[1], HEX);

status = nfc.antiCollision(data);
Expand Down

0 comments on commit f2b06cd

Please sign in to comment.