Commit 685e6919 authored by Patrick's avatar Patrick

removed duplicate 0 for hex bytes less than 0x10, removed serial output

parent 7856fc2b
......@@ -24,35 +24,17 @@ uint8_t last_uid[] = { 0, 0, 0, 0, 0, 0, 0 }; // Buffer to store the returned U
uint32_t last_read = 0UL;
void setup(void) {
//Serial.begin(9600);
//Serial.println("Hello!");
nfc.begin();
uint32_t versiondata = nfc.getFirmwareVersion();
if (! versiondata) {
//Serial.print("Didn't find PN53x board");
while (1); // halt
}
// Got ok data, print it out!
//Serial.print("Found chip PN5"); Serial.println((versiondata>>24) & 0xFF, HEX);
//Serial.print("Firmware ver. "); Serial.print((versiondata>>16) & 0xFF, DEC);
//Serial.print('.'); Serial.println((versiondata>>8) & 0xFF, DEC);
// configure board to read RFID tags
nfc.SAMConfig();
Keyboard.begin();
// Find out what the hell the codes are for a-f!
//for (int i=0; i<17; i++) {
//Keyboard.write(hex[i]);
//}
//for (int i=97; i<128; i++) {
//Keyboard.write(i);
//}
//Serial.println("Waiting for an ISO14443A Card ...");
}
......@@ -76,14 +58,7 @@ void loop(void) {
}
if (success) {
//nfc.PrintHex(uid, uidLength);
for (int i=0; i<uidLength; i++) {
if (uid[i] < 0x10) {
//Serial.print(F("0"));
//keyboard print "0"
Keyboard.print("0");
}
//Serial.print(uid[i], HEX);
Keyboard.write(hex[(uid[i] >>4) & 0x0F]);
Keyboard.write(hex[(uid[i]) & 0x0F]);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment