USB NES controller using a keyboard brain

This is a little thing I made while procrastinating recently, it is similar to what I did with the controls on my first arcade machine – ripped a keyboard apart and wired the matrix up to switches. This time I used a USB keyboard and tried to put it all inside a NES controller. I have seen NES controllers being recycled all over the show so this isn’t really anything new, although using a generic USB keyboard means it works with Linux, Windows and Mac. I used the linux command “showkey” and a lot of trial and error to probe around and find the correct combinations to produce up down etc.

About these ads

About austinmarton

I completed a Bachelor of Engineering (Hons) in Mechatronics at Massey University in New Zealand. In the day time I'm an Embedded Software Engineer working on Linux based networking products. Now based in Melbourne, Australia. I make things.

4 responses to “USB NES controller using a keyboard brain”

  1. wladodragovic says :

    Dang. I wish you’d make a tutorial for making this.

    • austinmarton says :

      That could be done but it’s pretty straight forward anyway. What part would you like explained?

  2. seb says :

    Hi. Could you explain which wires goes where?

    • austinmarton says :

      Hey sorry the exact wiring will vary depending on what keyboard you take apart. The ones I have seen inside use a simple matrix type thing:
      You have n wires in group A, and m wires in group B. Each combination of a wire from group A and a wire from group B gives a unique key combination. For example A1 and B4 might be CTRL and A3 and B1 might be ALT.
      To see which key is being triggered by each combination (Linux), open a new terminal without X (CTRL+ALT+F1) and run ‘showkey’.

      As for the NES controller, the only part that I reused was the push buttons which are just mechanical switches with 2 terminals, wire them directly to the wires you want to join.

      Good luck!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

%d bloggers like this: