The Trinket's USB port is used for uploading sketches, but you can also use it for some basic USB 1.1 devices. For example, under USB 1.1, you can make low speed USB devices such as...
  • HID devices
    • mouse
    • keyboard
    • joystick/gamepad/flightsim
    • many more... the drivers come from the operating system
  • MIDI devices (input notes from sensors, or generate outputs from notes, etc)
  • Custom devices (you have to write your own driver though)
  • There are a few more rare applications
However, USB 1.1 cannot do stuff like virtual serial ports or mass storage devices, these require USB 2.0, sorry.

The easiest and most useful is an HID keyboard, which is a device that does not require a driver, and acts just like a plain keyboard, but a little more customized

I have created an Arduino library that will transform your Trinket into an USB keyboard, and give you an example of how to use the library to create a two button keyboard.
The USB Keyboard code drives the Trinket at 16.5MHz - for that reason it may not work with 3V trinkets (it's considered overclocking) Please use 5V Trinkets!

This guide was first published on Sep 27, 2013. It was last updated on Mar 08, 2024.

This page (Overview) was last updated on Jan 22, 2024.

Text editor powered by tinymce.