Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

NFC Mouse Banner NFC Python Status

An ESP32-based wireless mouse that combines BLE joystick mouse control with clipboard-to-NFC text transfer — all in one device.


📸 Photos

Front View

FRONT_SIDE

Back View

BACK_SIDE

✨ What it does

Feature Description
🖱️ Wireless Mouse Move the pointer using an analog joystick over Bluetooth (BLE HID). No dongle needed.
🖱️ Left & Right Click Two physical buttons for mouse clicks, also over BLE.
📋 Clipboard to NFC Copy any text on your PC → auto-written to NFC tag → scan with phone.
📵 No Interference RC522 antenna turns off after each write so your phone can scan freely.

🔧 Hardware Required

Component Details
ESP32 Dev Module Main microcontroller
RC522 RFID/NFC Module For writing to NFC tag
Analog Joystick Mouse movement
2x Push Buttons Left and right click
NTAG216 NFC Sticker Tag 888 bytes, 13.56 MHz
Breadboard + Wires For connections

📌 Pin Connections

RC522 → ESP32

RC522 ESP32
SDA GPIO 5
SCK GPIO 18
MOSI GPIO 23
MISO GPIO 19
GND GND
RST GPIO 27
3.3V 3.3V

⚠️ RC522 runs on 3.3V only — do not connect to 5V.

Joystick → ESP32

Joystick ESP32
VCC 5V
GND GND
VRX GPIO 32
VRY GPIO 33
SW Not connected

Buttons → ESP32

Button ESP32 Pin
Left Click GPIO 13
Right Click GPIO 4
Other leg (both) GND

No resistors needed — internal pullup is used.


💻 Software Requirements

Arduino Libraries

  • MFRC522 by GithubCommunity
  • ESP32 BLE Mouse by T-vK (with compatibility fix for ESP32 core 3.x)

Python Libraries

pip install pyperclip pyserial

🚀 How to Use

1️⃣ Flash the ESP32

  • Open nfc_mouse.ino in Arduino IDE
  • Select ESP32 Dev Module as the board
  • Flash the code.

2️⃣ Pair Bluetooth

  • Go to Windows Bluetooth settings
  • Add device → find ESP32 BLE Mouse
  • Pair it

3️⃣ Run the Python Script

  • Close Arduino Serial Monitor first
  • Run:
python clipboard_monitor.py
  • The script monitors your clipboard and sends copied text to the ESP32 over Serial

4️⃣ Transfer Text to NFC

  • Copy any text on your PC
  • Python script sends it to ESP32 automatically
  • ESP32 writes it to the NFC tag
  • Scan the tag with your phone to read the text

⚙️ How it Works

Joystick → ESP32 → BLE HID ────────────────────► PC (mouse movement) Buttons → ESP32 → BLE HID ────────────────────► PC (left/right click) PC Clipboard → Python Script → Serial → ESP32 → RC522 → NFC Tag → 📱 Phone


📁 Files

File Description
nfc_mouse.ino Main ESP32 Arduino code
clipboard_monitor.py Python clipboard monitoring script

📝 Notes

  • RC522 antenna turns off after each NFC write so your phone can scan without interference
  • NTAG216 supports up to ~845 characters of text
  • Joystick center values may need calibration depending on your specific module
  • GPIO 2 on ESP32 is a strapping pin — avoid using it for buttons

📄 License

All rights reserved. This project is patent pending.

About

ESP32-based wireless mouse with BLE joystick control, click buttons, and clipboard-to-NFC transfer via RC522. Copy text on your PC → auto-writes to NFC tag → scan with phone.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages