Control Your Gaming Experience with an 8BitDo Controller on Raspberry Pi

A step-by-step guide on how to connect and configure an 8BitDo controller to your Raspberry Pi for a seamless gaming experience. …


Updated October 15, 2023

Need help with your Raspberry Pi?
Contact Me!

Do you love silly Raspberry Pi Projects?
Check out my this YouTube Channel!


A step-by-step guide on how to connect and configure an 8BitDo controller to your Raspberry Pi for a seamless gaming experience. To connect an 8BitDo controller to a Raspberry Pi, you’ll need to follow these steps:

  1. Prepare the necessary hardware and software:

    • A Raspberry Pi 4 or newer (any model will work)
    • An 8BitDo USB controller (e.g., SN30 Pro, SFC30, etc.)
    • A micro-USB to USB-A adapter (for powering the Pi)
    • An HDMI monitor and a compatible cable
    • A keyboard and mouse for configuration purposes
    • Raspberry Pi OS Lite or Full installed on an SD card (we’ll be using the Lite version in this guide)
    • A USB hub with enough ports to connect your controller, Pi, and other peripherals
  2. Power up your Raspberry Pi:

    • Insert the SD card into the Pi, then plug it into the USB hub along with a keyboard, mouse, and monitor.
    • Connect the micro-USB cable to the power adapter and the Pi.
    • Turn on the power switch, and the Pi will boot up. You should see the Raspberry Pi splash screen on your monitor.
  3. Update and upgrade the system:

    sudo apt update && sudo apt upgrade
    
  4. Install the necessary packages for gamepad support:

    sudo apt install xserver-xorg-input-all
    
  5. Connect your 8BitDo controller to the Pi via USB:

    • Plug in the controller into a free USB port on the hub.
    • The Pi should automatically recognize it and configure it for use. If not, run this command to check if the gamepad is detected:
      ls /dev/input/by-id/
      

      You should see an entry starting with “8BitDo” in the list.

  6. Configure your controller as a gamepad:

    • Create a configuration file for the gamepad by running this command:
      sudo nano /usr/share/X11/xorg.conf.d/8bitdo.conf
      
    • Add the following content to the file and save it (CTRL+X, Y, Enter):
      Section "InputClass"
          Identifier "8BitDo Gamepad"
          MatchProduct "8BitDo|SN30 Pro|SFC30|generic usb joystick"
          Driver "joystick"
      EndSection
      
    • Reboot the Pi to apply the changes:
      sudo reboot
      
  7. Test your controller:

    • After the Pi reboots, log in and open a terminal window.
    • Run this command to start the joystick tester:
      jstest-gtk
      
    • A new window should pop up showing the status of your controller’s buttons and axes (joysticks). Test each button and axis to ensure they work as expected.
  8. Set up RetroPie for gaming:

    • RetroPie is a popular emulator frontend that makes it easy to play games on Raspberry Pi. To install it, follow the official guide here: https://retropie.org.za/docs/First-Installation/
    • Once installed, configure your controller as a RetroPie input device by following the instructions in the documentation.
  9. Enjoy gaming on your Raspberry Pi with your 8BitDo controller!

Now you have an 8BitDo controller connected and configured for gaming on your Raspberry Pi. With RetroPie, you can play classic games or install new emulators to enjoy a wide variety of games on your device.