NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Everything Else » usb arcade

April 14, 2012
by benlbroussard
benlbroussard's Avatar

I would like to hook up some arcade style buttons and a joystick to a computer through USB. I'm going to put a front loader on the computer to run MAME and other emulators, so I think I want the buttons and joystick to act like keystrokes from a keyboard. I definitely need to be able to send multiple characters at once, but not more than 6 (which is usually a limitation of usb keyboards).

Before I go too far down the rabbit-hole, I would like to get some opinions about what components and code-base I should use. It might be that there is a simple and cheap usb keyboard chip that I could just hook my controls up to, for instance.

I have already found v-usb (, so I'm thinking about using the AtMega168 that I got with my nerdkits kit and implementing a modified form of one of their keyboard projects. I also pondered writing some simple keyboard software and using the serial-tty to USB cable that came with the kit, but I'm having a little trouble finding info about the cable and about usb keyboard protocol specs.

Other misc info: digital joystick (up, down, left, right), only as much progress as a thought experiment so far.

April 14, 2012
by dvdsnyd
dvdsnyd's Avatar

Hey Ben,

Sound's like a pretty neat project Keep us all posted on your progress. You may have already checked the keyboard tutorial out on the Nerdkit website, but if not, here is the link to it. Probably a good place to start though.


April 14, 2012
by pcbolt
pcbolt's Avatar

Ben -

Wow, so many ways you can go with a project like that.

I've downloaded the v-USB source code and poked through it. The developers abstract away most of the dirty work (which is a VERY good thing...if you don't believe me check out This Article from the site...fascinating stuff). Still, it's not trivial to implement but it would be a great learning experience. I think they got the code even smaller now.

You could try to emulate a PS2 keyboard. The PS2 protocol is documented Here. There are a few tricks to it, but it shouldn't stop you. 'Course your computer would need a PS2 port and you'd have to chop up a keyboard cable.

Post a Reply

Please log in to post a reply.

Did you know that you can follow NerdKits on Facebook, YouTube, and Twitter? Learn more...