ARDUINO UNO RFID WINDOWS 10 UNLOCK
by badvolt.info in Circuits > Arduino
820 Views, 1 Favorites, 0 Comments
ARDUINO UNO RFID WINDOWS 10 UNLOCK
Unlocking windows 10 pass or pin protected with the help of arduino and a RFID card.
The idea around this DIY project is simple. We need a HID capable device, a RFID card and reader. When the arduino reads the RFID card, and the id is the same with the one we entered , it presses the correct combination of the keystrokes ( password) and then presses enter.
Supplies
SOFTWARE
The Code
Upload the code
Code credits goes to AKASH124
#include
#include #define SS_PIN 10 #define RST_PIN 9 MFRC522 mfrc522(SS_PIN, RST_PIN); // Create MFRC522 instance.
uint8_t buf[8] = { 0 }; /* Keyboard report buffer */
int cardCount = 0; void setup() { Serial.begin(9600); randomSeed(analogRead(0)); delay(200); SPI.begin(); // Initiate SPI bus mfrc522.PCD_Init(); // Initiate MFRC522
} void loop(){ // Look for new cards if ( ! mfrc522.PICC_IsNewCardPresent()) { return; } // Select one of the cards if ( ! mfrc522.PICC_ReadCardSerial()) { return; } //Show UID on serial monitor String content= ""; byte letter; for (byte i = 0; i < mfrc522.uid.size; i++) { content.concat(String(mfrc522.uid.uidByte[i] < 0x10 ? " 0" : " ")); content.concat(String(mfrc522.uid.uidByte[i], HEX)); } content.toUpperCase(); if (content.substring(1) == "10 4B 58 7E" , "30 F1 CA 80") //change here the UID of the card/cards that you want to give access { delay(50);
delay(100);
buf[0] = 0; buf[2] = 0x26; // letter 9 Serial.write(buf, 8); releaseKey();
delay(200);
buf[0] = 0; buf[2] = 0x28; // letter Enter Serial.write(buf, 8); releaseKey();
delay(900);
cardCount++; } else { return; }
if(cardCount= 1 ){ delay(50);
buf[0] = 0; // Win buf[2] = 0x28; // letter enter Serial.write(buf, 8); releaseKey();
delay(50);
buf[0] = 0; buf[2] = 0x52; // letter Up Serial.write(buf, 8); releaseKey();
delay(50);
buf[0] = 0; buf[2] = 0x52; // letter Up Serial.write(buf, 8); releaseKey();
delay(50);
buf[0] = 0; buf[2] = 0x28; // letter Enter Serial.write(buf, 8); releaseKey();
delay(50);
buf[0] = 0; buf[2] = 0x28; // letter Enter Serial.write(buf, 8); releaseKey();
cardCount--; } }
void releaseKey() { buf[0] = 0; buf[2] = 0; Serial.write(buf, 8); // Release key }
( Details)
Change this part of the code to the keys you want to be pressed.
copy and paste the code as many times you want. check the map of the cosponsoring codes for each key. you can find it here.
buf[0] = 0; buf[2] = 0x26; // letter 9 Serial.write(buf, 8); releaseKey();
delay(200);
Change the id to the id of the card, ring or thing you want to use
content.toUpperCase(); if (content.substring(1) == "10 4B 58 7E" , "30 F1 CA 80") //change here the UID of the card/cards that you want to give access { delay(50);
Covert Serial to Keyboard
Connect the 2 pins as seen in the image for 1 sec
Fire up Flip 3.4.7
File -> open the USBKeyboard-master\firmware\Arduino-keyboard-0.3.hexDevice -> select -> Atmega16u2 ( or your chip)Settings -> communication -> usbRun
DONE
Reboot and test
Unplug and plug Arduino usbTest to txt file or lock the pc (win key + l)Enjoy
You can find the project HERE