Skip to content

flashbard/ezpc-rc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ezpc-rc

Use a cheap IR remote as a PC remote control. An Arduino reads IR signals and forwards them over serial to a Python server, which maps them to keyboard shortcuts, commands, or app launches — with swappable profiles for different apps.

Overview

IR Remote → Arduino (IR receiver) → Serial (USB) → Python server → keyboard/commands

Profiles let you switch the remote's behaviour on the fly (e.g. generic PC controls, VS Code debugger, browser, Netflix).

Hardware

  • Arduino (tested with Uno/Nano)
  • IR receiver module (data pin → pin 8)
  • Any NEC-protocol IR remote

Software

Requirements

  • Windows PC
  • Python 3
  • Arduino IDE

Python dependencies

pip install -r requirements.txt

Arduino dependencies (Arduino IDE Library Manager)

  • IRremote (≥ 4.x)

Usage

  1. Flash src/client/client.ino to your Arduino via the Arduino IDE.
  2. Connect the Arduino to your PC via USB.
  3. Update the serial port in src/main.py if needed (default: COM3):
    arduino = serial.Serial(port='COM3', baudrate=9600, timeout=.1)
  4. Run the server from the project root:
    python src/main.py

Point the remote at the IR receiver and press buttons — the mapped actions will fire on your PC.

Configuration

Edit config/profiles.yaml to customise button mappings. Each profile has a name, description, and a map of IR codes to actions.

Action types

Type Description value
key Press a key or shortcut list of key names
cmd Run a shell command or open a file/app string
profile Switch to the next profile (no value needed)

Key names follow the pynput keyboard reference. Single characters (letters, digits, symbols) can be used directly.

Example mapping

profiles:
- name: pc
  description: Generic PC controls
  map:
    ED12FF00:
      type: key
      value: [media_volume_up]
      description: Vol+
    FF00FF00:
      type: cmd
      value: "shutdown -s"
      description: Power
    FD02FF00:
      type: profile
      description: Switch profile

Finding your remote's IR codes

Run the server and press buttons on your remote — unmapped codes are printed to the console, so you can copy them into your config.

Note: The cmd type runs shell commands directly. Only use config files you trust.

License

MIT

About

Control your PC with a remote control via an Arduino

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors