Generic Controller Feesability.

I've been doing some research on electronic builds and have settled on the solid platform that Arduino has to offer, yet I am still very new to electronics and Arduino. I do know that building an entire circuit on my own would be the most "efficient" way to do this, but I need to use stable things to solidify my concept.

My challenge is this:

I have engineered a switch panel that has 12 toggle switch outputs and 1 axis output. I am able to tie them all into a UNO board properly (or so I believe it did lol) but I want to program the Arduino board to be recognized by the computer as a generic game controller. This would result in an automatic driver recognition and populate ( this kind of box.

  1. Is this possible.
  2. Does anyone have any suggestions on where to begin.
  3. If anyone has knowledge in the actual recognition and programming of the device properties that would show in the image above, do you have any resources I can look to?

This project is step 1 in a 5 step project that will get increasingly more complex, while adding in seven segment displays and more axis'. This is pretty much the most basic form of the project.

The Leonardo might be better than the Uno. It can be programmed to pretend to be a mouse / keyboard / other USB device.

[quote author=Nick Gammon link=topic=116468.msg876507#msg876507 date=1343598072] The Leonardo might be better than the Uno. It can be programmed to pretend to be a mouse / keyboard / other USB device. [/quote]Which I've seen in other posts. Problem is, I have an UNO. I can get one, but I would like to know if this is possible with what I have. I understand it may be more difficult than using a Leonardo. From what I understand Leonardo's library transmits signals in the form of "Keystrokes" when what I'm looking for is a way to make the board into a Generic Human Interface Device, and how to make windows recognize it as such.

Your response was appreciated.

The Leonard's USB interface can emulate other things than keyboards, eg. mouse/joystick. Probably many other things, I haven't tried.

I believe you can reprogram the USB chip on the Uno to do similar things, although I haven't done it myself. That makes uploading sketches harder, but you could upload via an FTDI cable or a ICSP programmer.

Try this site:

He uses a straight Atmega328 (and Attiny in some cases) to emulate keyboards and things. That is not using a USB chip at all but doing it in software.

'Better' depends on your application and needs. The Leonardo is better if you are interested in writing USB host functions. The standard UNO has the advantage of using a standard socket mounted DIP processor chip, useful for if you wish to develop a sketch and then pull the chip and mount into a standalone project and just buy a $6 replacement 328p chip for the Uno. So different strokes for different folks, there is no single perfect board for all needs and wants, that's why there are so many to choose from.


I did a little more digging and found Amtel Studio. Is this compatible with the Arduino platform? If what I'm reading is correct, I can set up the board to send signals within the parameters of what the UNO can perform. Then with the Studio application I should be able to create a driver that accepts the signals and transfers them into the generic controller ( settings. Is this correct? Or am I imagining a function of this hardware that is either to difficult or not possible.

Short answer: Yes you can use Amtel Studio with the microprocessor on the Uno because it's an ATmega328.

Longer answer: Yes you can use Amtel Studio with the microprocessor on the Uno because it's an ATmega328. However, I haven't used Amtel Studio myself so I don't know if can reprogram the chip through the Uno's USB or by way the 6 ICSP pins.

On the otherhand, as mentioned the Leonardo would be significantly easier because of its built-in HID mode and you can use the Arduino IDE. Unless you've had previous experience with embedded/microcontroller programming the Arduino IDE will probably be easier to learn and work with than the Amtel Studio IDE. If you are new to microcontrollers about $20.00 to get a Leonardo will save you a lot of time, effort, and perhaps frustration over continuing with the Uno (regardless of the IDE you use). Furthermore, you can learn what you've learned working with the Leonardo on a different project with the Uno, in case you haven't noticed that board can do hundreds if not thousands of other things even if it's not the best choice for a computer game controller.

In any case, this type of game controller is well within the hardware capabilities of either the Uno or Leonardo. The Leonardo route is quicker and more straight-forward (no custom drivers needed) path to a custom game controller, but you will save a little money and will learn quite a bit more if you continue with your Uno. It's ultimately up to you which option seems the best.