Git Product home page Git Product logo

snes-controller-usb-adapter's Introduction

SNES Controller to USB Adapter

This is a simple adapter to use a Super NES controller with a computer via USB. It is based on the ATmega32U4 microcontroller and uses the Arduino Keyboard.h library to emulate a keyboard.

It should work with both PAL and NTSC controllers, but I have only tested it with a PAL controller.

Hardware

Prototype board front Prototype board top

I used an Arduino Pro Micro clone, but any ATmega32U4-based board should work, e.g. an Arduino Leonardo. You can modify the pin assignments in hardware.h, further instruction on how to wire the controller to the board can be found in the main sketch.

The "lock" pin is a simple pull-up digital input. When it is not pulled low, the controller is locked and no input is sent to the computer. This is useful when reflashing the board in case of malfunctioning code. You can short it to ground if you do not plan to change the code.

Some boards do not have a reset button, you can add one placed between the reset pin and ground.

Software

Button -> Keyboard mapping

As of current version, the adapter maps the controller buttons as follows:

SNES button Keyboard key
L l
R r
Joypad Up Up arrow
X x
Joypad left Left arrow
Joypad right Right arrow
Select Right shift
Start Enter
Y y
A a
Joypad down Down arrow
B b

LED feedback

LED state Meaning
Off No power
On Power
1 Hz Controller not connected
2 Hz Locked (internal switch)

Compiling and flashing

You can use the Arduino IDE to compile and flash the adapter. You will probably need to upload the sketch as on Arduino Leonardo. Also, if having trouble flashing the board, be aware of this issue.

snes-controller-usb-adapter's People

Contributors

giulioprocopio avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.