I like the idea of avoiding the the FTDI drivers and the attendant reboot. It would also be nice to make a USB board entirely from through-hole components for ease of soldering. What I'm not sure about is how software could communicate in a general way with the Arduino board acting as HID device. Currently, Processing, Flash (via the serial proxy), etc. exchange data with the Arduino board in a reasonably standard way via a virtual com port. Is there an equivalent in the HID world? How would the user identify the Arduino board to the IDE (e.g. the equivalent of picking an item from the Tools > Serial Port menu)? Or can it be detected automatically? What type of HID device would the second ATmega act as? Or, how would one switch between them?
Another idea is to create a shield with an ATmega8 running AVR-USB, to allow a normal Arduino to emulate a keyboard, or communicate with another HID protocol. Would that be enough?
Usage Page (Generic Desktop) Usage (GamePad) Collection (Application) Usage (Pointer) Collection (Physical) Usage (X) Usage (Y) Usage (Z) Usage (Rx) Usage (Ry) Usage (Rz) Usage (Slider) Usage (Dial) Logical Minimum......... (0) Logical Maximum......... (1023) Report Size............. (16) Report Count............ (8) Input................... (Data, Variable, Absolute, No Wrap, Linear, Preferred State, No Null Position, Bitfield) End Collection Usage Page (Button) Usage Minimum........... (1) Usage Maximum........... (14) Logical Minimum......... (0) Logical Maximum......... (1) Report Size............. (1) Report Count............ (14) Input................... (Data, Variable, Absolute, No Wrap, Linear, Preferred State, No Null Position, Bitfield) End Collection
I think the output (communication from the computer to the Arduino) is a problem. Processing, for example, has a standard library for doing serial communication, but I don't see anything for calling low-level HID output functions. I imagine other languages have similar issues. As a general purpose device, it's important for the Arduino to be able to flexibly communicate with software.
I'm concerned about the input side, too... sure, the Arduino could pretend to be a mouse or joystick, but what happens if you need to communicate data that can't be squeezed into an X and Y coordinate (or whatever data format is predefined for those HID devices)?Maybe this would make more sense as a (slightly) different device? One that comes preprogrammed with firmata, say, and so only needs to send specific types of information would could fit in a HID protocol?
Oh, and the reason behind the proposed shield having its own ATmega is because that one could be running at 12 MHz. Plus, that would take the burden of having the AVR-USB implementation off of the main ATmega. There could be some simple protocol for the main chip to send a keystroke, say, to the usb ATmega to send to the computer.
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16