Skip to content

A rough guide to getting paired joycon events with evdev on a raspberry pi

License

Notifications You must be signed in to change notification settings

marcobaldo/rpi-joycon-guide

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

This is a rough guide to capturing paired joycon events using python-evdev on your Raspberry Pi. I tested this on a the latest Raspberry Pi OS and on a Raspberry Pi 4 Model B. When I get my hands on a clean device, I'll do a more detailed step-by-step guide.

TL;DR

You will need to install/setup cmake, python3, python-evdev, hid-nintendo, joycond. When you pair your joycons, two new entries - Joycon (L) / (R) - will be created in /dev/input. You can then simultaneously press two triggers which should create another input called Joycon (Combined).

Rough guide

  1. Update packages:
sudo apt update && sudo apt upgrade
  1. Install cmake
sudo apt install cmake
  1. Install python3
sudo apt install python3
sudo rm /usr/bin/python
sudo ln -s /usr/bin/python3.9 /usr/bin/python
  1. Update your kernel headers.
sudo apt install raspberrypi-kernel raspberrypi-kernel-headers
  1. Install python-evdev
sudo apt install evdev
python list_devices.py # check if evdev works
  1. Install dkms-hid-nintendo from source
git clone https://github.com/nicman23/dkms-hid-nintendo
cd dkms-hid-nintendo

sudo dkms add .
sudo dkms build nintendo -v 3.2
sudo dkms install nintendo -v 3.2
cd ..
  1. Install joycond from source
sudo apt install libevdev-dev libudev-dev
git clone https://github.com/DanielOgorchock/joycond/
cd joycond
cmake .
sudo make install
sudo systemctl enable --now joycond
cd ..
  1. Pair your joycons. Run python list_devices.py again to check if they were paired successfully. Press a single trigger on both joycons to combine them into a new input. Run python list_devices.py again to check for the new input.

  2. The new combined joycon will have a slightly different mapping. Run python joycon.py to test the button mappings. You may have to change the device name at the top of the file.

TODO

  1. Calibration

  2. Step-by-step guide from clean install

About

A rough guide to getting paired joycon events with evdev on a raspberry pi

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages