user7990: Lately I've been fooling around with a project for my Microsoft Sidewinder Force Feedback Pro Joystick. I've found out that there is a project currently for it built for the Teensy 2.0. On the page for the Teensy 2.0 there is a link for an Arduino Library for the very same project that was (I guess) converted. There isn't much documentation for it, and I don't think there is much progress being made on it anymore. However when I grab the files and try to upload it to my Arduino Uno it spits out an Unsupported device. Doing some digging around I found where it shows what devices are supported in the includes.h.. Which happen to be
#if defined(__AVR_AT90USB162__) || defined(__AVR_AT90USB82__)
 #define __AVR_AT90USBX2__
#elif defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__)
 #define __AVR_ATmegaXU4__
#elif defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB1286__)
 #define __AVR_AT90USBX6__
#else
 #error "Unsupported device"
#endif

Which ends up being the red arduino, arduino micro, arduino leonardo, and I think a few teensys. 
What I want to know is if you can upload this code onto a UNO. I'm not really wanting to purchase a teensy just to check if this will work or not.

user2881: That program will make the arduino board act like a keyboard to the PC it's plugged in. This can't be done on the Uno, since it doesn't have USB support. 

user379: The code won't work as a traditional project when uploaded on an Uno, because the Uno does not talk directly to the Host, it only speaks UART.
But good news is that the Uno uses another atmega chip, an Atmega8u2 on the older models or Atmega16u2 on the others. That IC handles directly the USB connection with the host on behalf of the Atmega328. And that code below is actually (close enough) support for that IC:
#elif defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__)
 #define __AVR_ATmegaXU4__

That means you should be able to upload the code (or a similar one) on that 'frontend' IC, so it acts as a HID device, and connects to the main 328 for any I/O you might need.
To do the upload on that other chip, you can use an ISP programmer on the 6pins header close to USB, or you can use the DFU programmation mode over USB.
I'm sorry for not giving external references or code, but I'm answering from my phone!
Edit: after a short browse over the code, it's definitely possible to implement that using an uno, but you'll need to split the code between the two chips: the USB interface to behave like ah HID device and the main I/O chip to talk midi, and implement comms between both.
Edit #2: 
Here's a few resources that might help to work out USB and Midi using Arduino, but it looks like none is a cooked in USB on atmegaXu2 to Midi on atmega328:

http://unojoy.tumblr.com/
http://forum.arduino.cc/index.php/topic,111.0.html
http://hunt.net.nz/users/darran/weblog/15f92/Arduino_UNO_Big_Joystick_HID_firmware.html
https://stackoverflow.com/questions/16710701/joystick-usb-definition-for-use-with-arduino
http://hackaday.com/2011/03/28/hiduino-the-only-limit-is-yourself/
http://arduino.cc/en/Hacking/DFUProgramming8U2
http://arduino.cc/en/tutorial/midi
https://sites.google.com/site/bharatbhushankonka/home/diy-midi-over-usb-using-arduino-uno
http://www.instructables.com/id/Turn-your-Arduino-Uno-into-an-USB-HID-Mididevice/

And if you're not at ease with AVR development, it's gonna be HARD. You'd better get a teensy2 or a leonardo where that code should compile and work with little effort.
HTH

7990: <p>Lately I've been fooling around with a project for my Microsoft Sidewinder Force Feedback Pro Joystick. I've found out that there is a project currently for it <a href="https://code.google.com/p/adapt-ffb-joy/" rel="nofollow">built for the Teensy 2.0</a>. On the page for the Teensy 2.0 there is a link for an <a href="https://code.google.com/p/sidewinder-arduino/" rel="nofollow">Arduino Library</a> for the very same project that was (I guess) converted. There isn't much documentation for it, and I don't think there is much progress being made on it anymore. However when I grab the files and try to upload it to my Arduino Uno it spits out an Unsupported device. Doing some digging around I found where it shows what devices are supported in the includes.h.. Which happen to be</p>

<pre><code>#if defined(__AVR_AT90USB162__) || defined(__AVR_AT90USB82__)
 #define __AVR_AT90USBX2__
#elif defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__)
 #define __AVR_ATmegaXU4__
#elif defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB1286__)
 #define __AVR_AT90USBX6__
#else
 #error "Unsupported device"
#endif
</code></pre>

<p>Which ends up being the red arduino, arduino micro, arduino leonardo, and I think a few teensys. </p>

<p>What I want to know is if you can upload this code onto a UNO. I'm not really wanting to purchase a teensy just to check if this will work or not.</p>
 2881: <p>That program will make the arduino board act like a keyboard to the PC it's plugged in. This can't be done on the Uno, since it doesn't have USB support. </p>
 379: <p>The code won't work as a traditional project when uploaded on an Uno, because the Uno does not talk directly to the Host, it only speaks UART.</p>

<p>But good news is that the Uno uses another atmega chip, an Atmega8u2 on the older models or Atmega16u2 on the others. That IC handles directly the USB connection with the host on behalf of the Atmega328. And that code below is actually (close enough) support for that IC:</p>

<pre><code>#elif defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__)
 #define __AVR_ATmegaXU4__
</code></pre>

<p>That means you should be able to upload the code (or a similar one) on that 'frontend' IC, so it acts as a HID device, and connects to the main 328 for any I/O you might need.</p>

<p>To do the upload on that other chip, you can use an ISP programmer on the 6pins header close to USB, or you can use the DFU programmation mode over USB.</p>

<p>I'm sorry for not giving external references or code, but I'm answering from my phone!</p>

<p>Edit: after a short browse over the code, it's definitely <em>possible</em> to implement that using an uno, but you'll need to split the code between the two chips: the USB interface to behave like ah HID device and the main I/O chip to talk midi, and implement comms between both.</p>

<p>Edit #2: </p>

<p>Here's a few resources that might help to work out USB and Midi using Arduino, but it looks like none is a cooked in USB on atmegaXu2 to Midi on atmega328:</p>

<ul>
<li><a href="http://unojoy.tumblr.com/" rel="nofollow noreferrer">http://unojoy.tumblr.com/</a></li>
<li><a href="http://forum.arduino.cc/index.php/topic,111.0.html" rel="nofollow noreferrer">http://forum.arduino.cc/index.php/topic,111.0.html</a></li>
<li><a href="http://hunt.net.nz/users/darran/weblog/15f92/Arduino_UNO_Big_Joystick_HID_firmware.html" rel="nofollow noreferrer">http://hunt.net.nz/users/darran/weblog/15f92/Arduino_UNO_Big_Joystick_HID_firmware.html</a></li>
<li><a href="https://stackoverflow.com/questions/16710701/joystick-usb-definition-for-use-with-arduino">https://stackoverflow.com/questions/16710701/joystick-usb-definition-for-use-with-arduino</a></li>
<li><a href="http://hackaday.com/2011/03/28/hiduino-the-only-limit-is-yourself/" rel="nofollow noreferrer">http://hackaday.com/2011/03/28/hiduino-the-only-limit-is-yourself/</a></li>
<li><a href="http://arduino.cc/en/Hacking/DFUProgramming8U2" rel="nofollow noreferrer">http://arduino.cc/en/Hacking/DFUProgramming8U2</a></li>
<li><a href="http://arduino.cc/en/tutorial/midi" rel="nofollow noreferrer">http://arduino.cc/en/tutorial/midi</a></li>
<li><a href="https://sites.google.com/site/bharatbhushankonka/home/diy-midi-over-usb-using-arduino-uno" rel="nofollow noreferrer">https://sites.google.com/site/bharatbhushankonka/home/diy-midi-over-usb-using-arduino-uno</a></li>
<li><a href="http://www.instructables.com/id/Turn-your-Arduino-Uno-into-an-USB-HID-Mididevice/" rel="nofollow noreferrer">http://www.instructables.com/id/Turn-your-Arduino-Uno-into-an-USB-HID-Mididevice/</a></li>
</ul>

<p>And if you're not at ease with AVR development, it's gonna be <strong>HARD</strong>. You'd better get a teensy2 or a leonardo where that code should compile and work with little effort.</p>

<p>HTH</p>
