USB HID Terminal Alternative

Author Gravatar Image FRANK ZHAO
Another way of communicating with the Trinket uses HID to pass raw USB messages back and forth. This technique was created by Ray's Hobby. The key difference between Ray's method and the method discussed above is:
  • Ray's method uses a HID profile, thus no driver installations are required at all
  • Compared to the Fake USB method uses a custom profile with a libusb driver
  • Ray's method uses a customized serial terminal that he wrote himself
  • The Fake USB method works with most generic serial terminal programs, but requires running a background application to act as a "bridge"
For a lot more information check out http://rayshobby.net/?p=7363 where the technique is talked about in detail
Ray's code is not specifically designed for Trinket, so to make it work with Trinket, I have forked Ray's github for this project and made modifications to his code so that it also works with the Trinket.
You can download all the files from the github repo above.

The only changes are:
  • changed usbconfig.h to include different pin assignments
  • added the oscillator calibration function required for ATtiny
  • adjusted clock speed for Trinket
I did not modify Ray's host software at all. It works with his software without any modifications. His software is written using Processing.org, and while the executables are also included, you should have Java installed in order to use them. The host software should work on any platform that can run Processing.org applications (or any platform that can run Java, meaning Windows, Linux, and Mac should all work).

When you have downloaded all the files, install the Arduino library as usual. You can then try compiling your own sketches using the library, or try running one of the provided example sketches.

Then to use the serial terminal, either run the host software that you've already downloaded. You may use Processing.org to open the host software, or use one of the provided precompiled executables specific to your operating system.
Ray's method must use his own serial terminal, it will not work with Arduino IDE's own serial terminal, it will not work with Hyperterminal or TeraTerm or anything else. It will only work with Ray's own serial terminal application.
Last updated on 2014-04-05 at 05.13.03 PM Published on 2013-10-15 at 06.33.48 PM