Skip to content
Diego Herranz edited this page Jan 22, 2015 · 2 revisions

Table of Contents

Why?

The HIDUINO project was started by Dimitri Diakopoulos to address the desire for USB-compatible musical interfaces and musical robotics in the Music Technology: Interaction, Intelligence, and Design program at the California Institute of the Arts. The program has standardized on the http://www.arduino.cc Arduino platform for robotics and physical computing instruction for a number of reasons: usability, accessibility, and learnability. The Lightweight USB Framework for AVRs (LUFA) has been available for USB-AVR devices for some time now. The primary goal of the HIDUINO project was to leverage the LUFA library for the Arduino and open it up to a more general learning and development audience.


HIDUINO Firmware & Arduino Sketches

The main usability of issue of HIDUINO revolves around the virtual serial port functionality of the default 8u2 firmware. Once a HIDUINO firmware is flashed onto the 8u2, a computer loses the ability to serially bootload the ATmega328 microcontroller on the Arduino. There are currently two solutions: the first involves the use of an in-system-programmer (ISP) to reflash HIDUINO/usbserial firmwares as necessary; the second involves the use of the Atmega DFU bootloader.

Rev3 Arduino boards were manufactured ATmega16u2 in place of the 8u2 (16kb vs 8kb of space). The HIDUINO developers are currently working on a firmware that can integrate both HIDUINO and usbserial in a single firmware. Selection of firmware can be done by manually holding a pin HIGH or LOW when the Arduino is first plugged in.


(HIDUINO + Arduino) Vs. The Teensy Vs. Other AVR-USB boards

There is no shortage of AVR-USB development boards on the market. One of the most popular is the Teensy, a beautifully designed and cheap board that even works the Arduino IDE (Teensyduino). The Teensy uses a USB-AVR chip so it can directly communicate over USB, unlike other chips on the Arduino. Teensy uses their own USB library for this functionality which can be limiting in some respects. LUFA is also compatible with the Teensy, and so HIDUINO can also be used with the Teensy or any other AVR-USB board. The development toolchain and workflow of other AVR-USB boards mirrors much of the Arduino+HIDUINO documentation listed here.


AVR USB Libraries: LUFA Vs. The Atmel Stack Vs. USB-V

Dean Camera, the author of the LUFA library offers a great overview of his implementation versus the other common AVR-USB stacks. The HIDUINO project uses LUFA for nearly all the reasons he lists.


HIDUINO echos every message I send to it?!

Somewhere around rev. 92, the project scrapped the included MIDI library in favor of the standard MIDI Library (v3.1.1 as of this writing). Confusingly, in MIDI.h, there's a #define at the top which by default enables midi-thru, echoing all messages back out. To disable this, just set the #define to 0 instead of 1.


Other similar projects out there?

In February 2011 MocoLUFA was released, offering specific functionality for MIDI on the Arduino UNO. Darran Hunt has recently assembled a few firmwares as well.


MIDI Sucks! What about OSC?

MIDI was designed for the 1980s: low-resolution and low-bandwidth. The introduction of USB-MIDI alleviated bandwidth problems but the protocol still can only manage 7-bit resolution for the most common MIDI tasks -- Note On, Control Change, etc. OpenSoundControl was developed as a standardized protocol to fix all of the problems associated with MIDI, however commercial adoption of the technology has been slow. It is currently possible to do OSC on the Arduino via the Ethernet shield, but projects using it need to measure added development time and expense. In 2010 the Arduino team hinted at the possibility of a board with an integrated Ethernet stack, but this remains yet to be released to the public.

The CDC-ECM (Ethernet Control Model) protocol of the USB specification defines a USB type for transferring TCP and UDP frames over USB as a virtual network device. Currently the LUFA library used in the HIDUINO does not support CDC-ECM (it has been listed as a Future Change for some time) -- it is a secondary goal of the HIDUINO project to develop a firmware that can support CDC-ECM for use with protocols like OSC (or really, anything TCP/UDP). Stay tuned.


New Interfaces for Musical Expression 2011

"HIDUINO: a firmware for building class compliant MIDI devices" was presented at the New Interfaces for Musical Expression conference held May 30th through June 1st 2011 in Oslo, Norway. Visit here for a PDF of the publication. A video of the talk has been posted on Vimeo.