/Pico-Computer-Login

Unlocking your Computer using a Raspberry Pi Pico and RFID reader :)

Primary LanguagePython

Pico-Computer-Login

Unlocking your Computer using a Raspberry Pi Pico and RFID reader 😄. This is written in micropython and allows you to type your passwords using an RFID tag. It uses a third-party hid library compiled into the firmware-blank.uf2 file. I have also used third party libraries for the RFID reader and I2c LCD display. And use the firmware above to create this project. There is a github issue for the usb hid support usb hid support for micropython. And this forum which helped me alot to create this project here. I got the Libraries from these links: LCD and RFID. If you want to modify this code to type in your password go to this link and check the keykode code by scrolling down to the keyboard group. First run the mfrc522_read.py to read and know your rfid tags uid and then change it in the main.py. To change the uid in main.py on line 34 if card == 3050636775: # change this with the uid of your tag change the uid. And to make a key board press these lines are used:

report[3] = 0x04 # register 'a' keycode
usb_hid.report(usb_hid.KEYBOARD, report) # send event
time.sleep(0.1)
report[3] = 0x00 # unregister 'a' keycode
usb_hid.report(usb_hid.KEYBOARD, report) # send event

In the first two lines it is simulating the key press of the letter 'a' then a delay of 0.1 seconds (100 miliseconds) then in the last two lines the key is released. To change the keycode just change the value of report[3] = 0x04 with something else in the above code.

Circuit

The connections are:

  1. RC522 ---------------------------PICO
  2. SDA/CS---------------------------GP17
  3. SCK------------------------------GP18
  4. MISO-----------------------------GP16
  5. MOSI-----------------------------GP19
  6. RST------------------------------GP0
  7. GND------------------------------GND
  8. VCC------------------------------3.3V
  9. LCD------------------------------PICO
  10. SDA------------------------------GP20
  11. SCK------------------------------GP21
  12. GND------------------------------GND
  13. VCC------------------------------VBUS

Alt text Alt text Alt text