Skip to content

Add IR remote as input to any PC Decoding NEC protocol IR pulses from remote control with a Pico and perform keypress as a USB keyboard (HID).

Notifications You must be signed in to change notification settings

gharishkumar/pico-ir-keyboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pico-ir-keyboard

Add IR remote as input to any PC

To compile pico-ir-keyboard

  1. Set up your PC to point to use the Raspberry Pi Pico SDK, follow README in Raspberry Pi Pico SDK.
  2. Clone this GitHub repo
    $ git clone https://github.com/gharishkumar/pico-ir-keyboard.git
    
  3. Change to pico-ir-keyboard directory.
    $ cd pico-ir-keyboard
    
  4. Setup a CMake build directory. For example, if not using an IDE:
    $ mkdir build
    $ cd build
    $ cmake ..
    
  5. Make your target from the build directory you created.
    $ make -j4
    
  6. You now have pico_ir_keyboard.elf to load via a debugger, or pico_ir_keyboard.uf2 that can be installed and run on your Raspberry Pi Pico via drag and drop.

NOTE :

  • IR rx pin, IR command (or) Keyboard keycode can be customised in pico-ir-keyboard/src/main.c.
  • By default GP27 is set as INPUT.

Back story

Adding HID

 ✔️ It's a relatively simple and easy process available with TinyUSB, via CircuitPythonArduino IDE (or) Raspberry Pi Pico SDK.

 ❌ but not MicroPython.

Decoding IR with pico

  1. Try old python code.
  2. Search for Pico specific code.
  3. Changing the old code to C.
    • As USB HID support is available in Arduino IDE, I convert that old Python code to C.
    • It didn't work either.
  4. Trying with PIO.

Merging two

About

Add IR remote as input to any PC Decoding NEC protocol IR pulses from remote control with a Pico and perform keypress as a USB keyboard (HID).

Topics

Resources

Stars

Watchers

Forks