Skip to content

convert RFID Tag Data into keystrokes by emulating a USB Keyboard on a Pi Pico.

License

Notifications You must be signed in to change notification settings

LaserBorg/circuitpython-rfid-hid

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

circuitpython-rfid-hid

Raspberry Pi Pico with MFRC522-Module on Breadboard convert RFID Tag Data into keystrokes by emulating a USB Keyboard on a Pi Pico, including leave-events.
It can read and write tag data, but currently only checks if the tag UID exists in a JSON file.

This Project could easily be used to build a Sound Toy that works similar to the popular Toniebox®.

Hardware:

  • Raspberry Pi Pico (RP2040) with CircuitPython 9.x
  • MFRC522-based RFID reader using SPI
  • Mifare Classic 1k Tags
  • optional LED: NeoPixel (WS2812) or APA106 (WS2811)

RFID (MFRC522 Module)

RFID Class for MFRC522 is based on domdfcoding/circuitpython-mfrc522 (CircuitPython port),
forked from wendlers/micropython-mfrc522 (MicroPython port).

img source

MFRC522 Pico GPIO
sck GP06
mosi GP07
miso GP04
rst GP08
cs/sda GP05

Write Access to Pico's internal memory

Write Access for Pico is enabled by grounding Pin GP02 to mass. This sets the USB-filesystem to read-only, allowing Pico to write to it's own memory. Handled by boot.py at boot time as described here.

extra pins Pico GPIO
NeoPixel (PWM) GP00
write Access GP02

NeoPixel LED

APA106 LED is driven by Adafruit CircuitPython library as described here and wired like this: APA106 RGB LED
image source

USB HID (Keyboard Emulation)

USB-HID utilizes CircuitPython HID library which can emulate Keyboard and Mouse as described here or here.

Usage

Copy code.py, boot.py, known_tags.json and the lib/ directory with all it's content (mfrc.py class and adafruit libraries) to the root of Pico's File System.